diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2024-06-10 15:01:41 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2024-06-10 15:01:41 -0300 |
commit | 70a7abacbb36783fb77025814242faf32a6c8a47 (patch) | |
tree | 9cd3e5b5b14a5e4af44690a6e10e99892b833700 /test/tests.cratera | |
parent | 9c609675ff8e801ffbc27b8bd4fe90466a2dc24a (diff) |
Fix parsing of certain constructs v2.1.0-p1
Diffstat (limited to 'test/tests.cratera')
-rw-r--r-- | test/tests.cratera | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/tests.cratera b/test/tests.cratera index fd97917..8977b74 100644 --- a/test/tests.cratera +++ b/test/tests.cratera @@ -9,6 +9,7 @@ t[T] = t t.f = print t.ff = print t.g = function(self, a) print(self, a[1]) end +t.h = function(self, v) return v end t[F] = print local _f="f" local _t="t" @@ -48,6 +49,17 @@ _=(t:[_t].f(11)) -- inside () t:[_t].g {12} -- table call t:[_t].f "13" -- string call +;(function()return t end)():[(function() return t:[(function()return"t"end)()].h("t") end)()].f(14) -- function using traits in trait key +;(function()return t end)():[(function() return (function()return t end)():[(function()return"t"end)()].h("t") end)()].f(15) -- function using traits in trait key +local function call_f(v) + (function()return t end)():["t"].f(v) +end +call_f(16) +call_f = function(v) + (function()return t end)():["t"].f(v) +end +call_f(17) +;t.t.t.t.h(t, t):["t"].f(18) entity = {} |