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

global arr,rra
global s,n
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) { s=k.""; i=arr[k]+0 }
  foreach (l in arr) { s=l.""; i=arr[l]+0 }
  if (m in rra) { i=m+1; s=rra[m]."" }
  foreach (n in rra) { i=n+0; s=rra[n]."" }
}