diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2023-03-26 18:23:52 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2023-03-26 18:23:52 -0400 |
commit | 6aa8c17b281eb0c8785bb76449bad428b6b3fdd6 (patch) | |
tree | fb7f7ce45a1e12abf29d2333727bbee47c017da5 /tnslc/simple.tnsl | |
parent | 4a71d4c02a4613454f3fdb782acd830de0f23641 (diff) |
Fixes for method calling
Diffstat (limited to 'tnslc/simple.tnsl')
-rw-r--r-- | tnslc/simple.tnsl | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tnslc/simple.tnsl b/tnslc/simple.tnsl index 8af8a68..0a419c8 100644 --- a/tnslc/simple.tnsl +++ b/tnslc/simple.tnsl @@ -3,7 +3,8 @@ {}uint8 str2 = "abcd" /; method Test - /; wamba + /; wamba [int] + return self.i + self.j ;/ ;/ @@ -11,10 +12,6 @@ struct Test { int i, j, k } -/; call_me (int i, ~int j) [int] - return i + j` -;/ - /; main (int argc, ~~uint argv) [int] # On windows, the first two arguments are passed in RCX and RDX, so we need to # update their positions here or else tnsl will have garbage values in r8 and r9 @@ -35,8 +32,8 @@ struct Test { argc = 90 ;/ - m.j = call_me(m.j, ~argc) + m.i = argc # return 3 - return m.j + return m.wamba() ;/ |