From aab648543af3d874667041349b1a22ae19dde30b Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Mon, 15 May 2023 19:26:57 -0400 Subject: Fix initial struct calling --- tnslc/simple.tnsl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'tnslc/simple.tnsl') diff --git a/tnslc/simple.tnsl b/tnslc/simple.tnsl index 5ef7946..1c54577 100644 --- a/tnslc/simple.tnsl +++ b/tnslc/simple.tnsl @@ -2,17 +2,17 @@ {}uint8 str1 = "abcd" struct Stress { - int i + int i, j, k } struct Test { - Stress s + ~Stress s } -/; s_call () [Stress] - Stress a - a.i = 1 - return a +/; s_call (Test t) + t.s`.i = 1 + t.s`.j = 1 + t.s`.i + t.s`.k = t.s`.j + 1 ;/ /; main (int argc, ~~uint argv) [int] @@ -24,11 +24,11 @@ struct Test { Stress test Test stress - test.i = 1 + stress.s = ~test - stress.s = s_call() + s_call(stress) # return 3 - return stress.s.i + return stress.s`.k ;/ -- cgit v1.2.3