diff options
Diffstat (limited to '')
-rw-r--r-- | spec/outputs/codes_from_doc.lua | 8 | ||||
-rw-r--r-- | spec/outputs/codes_from_doc_zh.lua | 8 | ||||
-rw-r--r-- | spec/outputs/with.lua | 16 |
3 files changed, 32 insertions, 0 deletions
diff --git a/spec/outputs/codes_from_doc.lua b/spec/outputs/codes_from_doc.lua index d857dec..55be7df 100644 --- a/spec/outputs/codes_from_doc.lua +++ b/spec/outputs/codes_from_doc.lua | |||
@@ -2147,6 +2147,10 @@ do | |||
2147 | _with_1["key-name"] = value | 2147 | _with_1["key-name"] = value |
2148 | end | 2148 | end |
2149 | _with_0[#_with_0 + 1] = "abc" | 2149 | _with_0[#_with_0 + 1] = "abc" |
2150 | local _with_0 = obj | ||
2151 | if _with_0 ~= nil then | ||
2152 | print(obj.name) | ||
2153 | end | ||
2150 | do | 2154 | do |
2151 | local var = "hello" | 2155 | local var = "hello" |
2152 | print(var) | 2156 | print(var) |
@@ -4363,6 +4367,10 @@ do | |||
4363 | _with_1["key-name"] = value | 4367 | _with_1["key-name"] = value |
4364 | end | 4368 | end |
4365 | _with_0[#_with_0 + 1] = "abc" | 4369 | _with_0[#_with_0 + 1] = "abc" |
4370 | local _with_0 = obj | ||
4371 | if _with_0 ~= nil then | ||
4372 | print(obj.name) | ||
4373 | end | ||
4366 | do | 4374 | do |
4367 | local var = "hello" | 4375 | local var = "hello" |
4368 | print(var) | 4376 | print(var) |
diff --git a/spec/outputs/codes_from_doc_zh.lua b/spec/outputs/codes_from_doc_zh.lua index ecab077..399f8c1 100644 --- a/spec/outputs/codes_from_doc_zh.lua +++ b/spec/outputs/codes_from_doc_zh.lua | |||
@@ -2141,6 +2141,10 @@ do | |||
2141 | _with_1["key-name"] = value | 2141 | _with_1["key-name"] = value |
2142 | end | 2142 | end |
2143 | _with_0[#_with_0 + 1] = "abc" | 2143 | _with_0[#_with_0 + 1] = "abc" |
2144 | local _with_0 = obj | ||
2145 | if _with_0 ~= nil then | ||
2146 | print(obj.name) | ||
2147 | end | ||
2144 | do | 2148 | do |
2145 | local var = "hello" | 2149 | local var = "hello" |
2146 | print(var) | 2150 | print(var) |
@@ -4351,6 +4355,10 @@ do | |||
4351 | _with_1["key-name"] = value | 4355 | _with_1["key-name"] = value |
4352 | end | 4356 | end |
4353 | _with_0[#_with_0 + 1] = "abc" | 4357 | _with_0[#_with_0 + 1] = "abc" |
4358 | local _with_0 = obj | ||
4359 | if _with_0 ~= nil then | ||
4360 | print(obj.name) | ||
4361 | end | ||
4354 | do | 4362 | do |
4355 | local var = "hello" | 4363 | local var = "hello" |
4356 | print(var) | 4364 | print(var) |
diff --git a/spec/outputs/with.lua b/spec/outputs/with.lua index 867d1b5..338d51f 100644 --- a/spec/outputs/with.lua +++ b/spec/outputs/with.lua | |||
@@ -234,4 +234,20 @@ do | |||
234 | end | 234 | end |
235 | a = _accum_0 | 235 | a = _accum_0 |
236 | end | 236 | end |
237 | do | ||
238 | local a | ||
239 | local _accum_0 | ||
240 | for i = 1, 100 do | ||
241 | local x = tb[i] | ||
242 | if x ~= nil then | ||
243 | local _des_0 = 1 | ||
244 | if _des_0 then | ||
245 | x.id = _des_0 | ||
246 | _accum_0 = x | ||
247 | break | ||
248 | end | ||
249 | end | ||
250 | end | ||
251 | a = _accum_0 | ||
252 | end | ||
237 | return nil | 253 | return nil |