summaryrefslogtreecommitdiff
path: root/tests/test_method_3.tnsl
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2024-03-25 21:56:52 -0400
committerKyle Gunger <kgunger12@gmail.com>2024-03-25 21:56:52 -0400
commit12679f9be4bd3a924ca0859a7ad133178513bace (patch)
treed671fb3b5ce776474fc5eaf691805008e87b29a5 /tests/test_method_3.tnsl
parent00f4940ff1c19f3659779b2db078b85f178cb5ab (diff)
Better tmp handling
Diffstat (limited to 'tests/test_method_3.tnsl')
-rw-r--r--tests/test_method_3.tnsl19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_method_3.tnsl b/tests/test_method_3.tnsl
new file mode 100644
index 0000000..46dec79
--- /dev/null
+++ b/tests/test_method_3.tnsl
@@ -0,0 +1,19 @@
+struct Mock {
+ int i, j
+}
+
+/; method Mock
+
+ /; mul () [int]
+ int j = self.i * self.j
+ return self.i
+ ;/
+;/
+
+/; main [int]
+ Mock a
+ a.i = 69
+ a.j = 0
+ return a.mul()
+;/
+