aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2023-05-17 15:11:09 +0800
committerLi Jin <dragon-fly@qq.com>2023-05-17 15:11:09 +0800
commit4bd1513262a61071b07f5efe2a3cb9356ce6c8c2 (patch)
treeaaaf73884315aeb436f7bb4020e9bd9c20344c90 /spec/outputs
parent0c589d36fadba92d547fc6a93a2d5494d4d51981 (diff)
downloadyuescript-0.16.5.tar.gz
yuescript-0.16.5.tar.bz2
yuescript-0.16.5.zip
fix spec.v0.16.5
Diffstat (limited to 'spec/outputs')
-rw-r--r--spec/outputs/existential.lua2
-rw-r--r--spec/outputs/metatable.lua35
2 files changed, 28 insertions, 9 deletions
diff --git a/spec/outputs/existential.lua b/spec/outputs/existential.lua
index b241b3b..391f553 100644
--- a/spec/outputs/existential.lua
+++ b/spec/outputs/existential.lua
@@ -201,7 +201,7 @@ do
201 local _obj_0 = tb 201 local _obj_0 = tb
202 if _obj_0 ~= nil then 202 if _obj_0 ~= nil then
203 do 203 do
204 local _obj_1 = getmetatable(_obj_0).__a 204 local _obj_1 = getmetatable(_obj_0).__call
205 if _obj_1 ~= nil then 205 if _obj_1 ~= nil then
206 _obj_1(123) 206 _obj_1(123)
207 end 207 end
diff --git a/spec/outputs/metatable.lua b/spec/outputs/metatable.lua
index 907a584..9f95787 100644
--- a/spec/outputs/metatable.lua
+++ b/spec/outputs/metatable.lua
@@ -76,8 +76,14 @@ getmetatable(a).__index = tb
76getmetatable(a).__index = tb 76getmetatable(a).__index = tb
77local mt = getmetatable(a) 77local mt = getmetatable(a)
78tb:func(#list) 78tb:func(#list)
79getmetatable(tb):__func(list) 79do
80getmetatable(tb):__func(list) 80 local _obj_0 = getmetatable(tb)
81 _obj_0["func"](_obj_0, list)
82end
83do
84 local _obj_0 = getmetatable(tb)
85 _obj_0["func"](_obj_0, list)
86end
81local index, setFunc 87local index, setFunc
82do 88do
83 local _obj_0 = getmetatable(require("module")) 89 local _obj_0 = getmetatable(require("module"))
@@ -86,7 +92,10 @@ end
86do 92do
87 local _with_0 = tb 93 local _with_0 = tb
88 print(getmetatable(_with_0).__add, getmetatable(_with_0.x):__index("key")) 94 print(getmetatable(_with_0).__add, getmetatable(_with_0.x):__index("key"))
89 a = getmetatable(getmetatable(getmetatable(_with_0).__index).__add):__new(123) 95 do
96 local _obj_0 = getmetatable(getmetatable(getmetatable(_with_0).__index).__add)
97 a = _obj_0["new"](_obj_0, 123)
98 end
90 b = t(#getmetatable(_with_0).__close.test) 99 b = t(#getmetatable(_with_0).__close.test)
91 c = t(#getmetatable(_with_0).__close(_with_0.test)) 100 c = t(#getmetatable(_with_0).__close(_with_0.test))
92end 101end
@@ -132,13 +141,23 @@ do
132 return _obj_0["value" .. tostring(x > y)](_obj_0, 123, ...) 141 return _obj_0["value" .. tostring(x > y)](_obj_0, 123, ...)
133end 142end
134do 143do
135 f = getmetatable(tb):__value(123, ...) 144 do
136 f(getmetatable(tb):__value(123, ...)) 145 local _obj_0 = getmetatable(tb)
137 getmetatable(tb):__value(123, ...) 146 f = _obj_0['value'](_obj_0, 123, ...)
138 return getmetatable(tb):__value(123, ...) 147 end
148 f((function(...)
149 local _obj_0 = getmetatable(tb)
150 return _obj_0['value'](_obj_0, 123, ...)
151 end)(...))
152 do
153 local _obj_0 = getmetatable(tb)
154 _obj_0['value'](_obj_0, 123, ...)
155 end
156 local _obj_0 = getmetatable(tb)
157 return _obj_0['value'](_obj_0, 123, ...)
139end 158end
140do 159do
141 f = getmetatable(tb).__value(123, ...) 160 f = getmetatable(tb)["value"](123, ...)
142 f = getmetatable(tb)["value" .. tostring(x < y)](123, ...) 161 f = getmetatable(tb)["value" .. tostring(x < y)](123, ...)
143 f(getmetatable(tb)['value'](123, ...)) 162 f(getmetatable(tb)['value'](123, ...))
144 getmetatable(tb)[ [[ value 163 getmetatable(tb)[ [[ value