summaryrefslogtreecommitdiffstats
path: root/testsuite/semko
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/semko')
-rwxr-xr-xtestsuite/semko/eleven.stp15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/semko/eleven.stp b/testsuite/semko/eleven.stp
new file mode 100755
index 00000000..34dfa225
--- /dev/null
+++ b/testsuite/semko/eleven.stp
@@ -0,0 +1,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]."" }
+}