summaryrefslogtreecommitdiffstats
path: root/testsuite/semok/ten.stp
blob: bb353a9ff3c6a5174f598a4b714c217324e847d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! 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]."" }
}