summaryrefslogtreecommitdiff
path: root/tests/test_pointer_5.tnsl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_pointer_5.tnsl')
-rw-r--r--tests/test_pointer_5.tnsl21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_pointer_5.tnsl b/tests/test_pointer_5.tnsl
new file mode 100644
index 0000000..2534dde
--- /dev/null
+++ b/tests/test_pointer_5.tnsl
@@ -0,0 +1,21 @@
+struct Hold {
+ ~~uint8 a,
+ ~uint8 b
+}
+
+/; method Hold
+
+ /; set (~uint8 to_set)
+ self.b = to_set
+ self.a = ~self.b
+ ;/
+;/
+
+/; main [int]
+ uint8 val = 69
+
+ Hold h
+ h.set(~val)
+
+ return h.a``
+;/