summaryrefslogtreecommitdiff
path: root/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testPerson.smp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testPerson.smp')
-rw-r--r--src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testPerson.smp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testPerson.smp b/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testPerson.smp
new file mode 100644
index 00000000..f860091d
--- /dev/null
+++ b/src/test/java/com/seaofnodes/simple/spill/Chapter22Test-testPerson.smp
@@ -0,0 +1,8 @@
+struct Person {
+ i32 age;
+};
+
+val fcn = { !Person?[] ps, int x ->
+ if( ps[x] )
+ ps[x].age++;
+};