diff options
author | Li Jin <dragon-fly@qq.com> | 2024-09-04 12:16:10 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2024-09-04 12:16:25 +0800 |
commit | 461bf7c32408553125d71b23e04e21fed690c4f5 (patch) | |
tree | 4442efd0fc2524e82be63e12e3e046a0532b26dd /spec/outputs/metatable.lua | |
parent | 2f8215df7288e0aac690c8e8b1ff79865f114302 (diff) | |
download | yuescript-0.25.1.tar.gz yuescript-0.25.1.tar.bz2 yuescript-0.25.1.zip |
fix more cases for evaluation order of multi-value assignments.v0.25.1
Diffstat (limited to 'spec/outputs/metatable.lua')
-rw-r--r-- | spec/outputs/metatable.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/outputs/metatable.lua b/spec/outputs/metatable.lua index 0715b58..974a6e4 100644 --- a/spec/outputs/metatable.lua +++ b/spec/outputs/metatable.lua | |||
@@ -58,11 +58,12 @@ do | |||
58 | local _obj_2 = getmetatable(_obj_1) | 58 | local _obj_2 = getmetatable(_obj_1) |
59 | add, sub = _obj_2.__add, _obj_2.__sub | 59 | add, sub = _obj_2.__add, _obj_2.__sub |
60 | end | 60 | end |
61 | setmetatable(a.b, { }) | ||
62 | x.abc = 123 | 61 | x.abc = 123 |
62 | setmetatable(a.b, { }) | ||
63 | setmetatable(func(), mt) | 63 | setmetatable(func(), mt) |
64 | a = 1 | ||
64 | setmetatable(b.c, mt) | 65 | setmetatable(b.c, mt) |
65 | a, d, e = 1, "abc", nil | 66 | d, e = "abc", nil |
66 | local is_same = getmetatable(a).__index == getmetatable(a).__index | 67 | local is_same = getmetatable(a).__index == getmetatable(a).__index |
67 | setmetatable(a, { | 68 | setmetatable(a, { |
68 | __index = tb | 69 | __index = tb |