#! stap -p2

global arr,rra

probe begin {
  arr["key"]=0
  rra[0]="value"
}
probe end {
  # confirm that typechecking works the same way for all array indexing
  if (k in arr) { k.""; arr[k]+0 }
  foreach (l in arr) { l.""; arr[l]+0 }
  if (m in rra) { m+0; rra[m]."" }
  foreach (n in rra) { n+0; rra[n]."" }
}
