summaryrefslogtreecommitdiffstats
path: root/testsuite/semko/eleven.stp
blob: 34dfa2252bb9d5e9981baec9c234dd3e95b5398e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! stap -p2

global arr,rra

probe begin {
  arr[0]="value"
  rra["key"]=0
}
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+1; rra[m]."" }
  foreach (n in rra) { n+0; rra[n]."" }
}