diff options
author | Li Jin <dragon-fly@qq.com> | 2022-02-15 09:55:18 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-02-15 09:55:18 +0800 |
commit | f4e2286da2b0212b0a7ac76821203bd398cfac5b (patch) | |
tree | 74e009d36b1cd67426ba729c8cb073f414f86cbf /spec/outputs/pipe.lua | |
parent | ddb0b9deb720368a425d00bce0c0352469b55911 (diff) | |
download | yuescript-f4e2286da2b0212b0a7ac76821203bd398cfac5b.tar.gz yuescript-f4e2286da2b0212b0a7ac76821203bd398cfac5b.tar.bz2 yuescript-f4e2286da2b0212b0a7ac76821203bd398cfac5b.zip |
fix a global variable check case.
Diffstat (limited to 'spec/outputs/pipe.lua')
-rw-r--r-- | spec/outputs/pipe.lua | 50 |
1 files changed, 32 insertions, 18 deletions
diff --git a/spec/outputs/pipe.lua b/spec/outputs/pipe.lua index bf517ae..345f8b0 100644 --- a/spec/outputs/pipe.lua +++ b/spec/outputs/pipe.lua | |||
@@ -32,31 +32,45 @@ do | |||
32 | end | 32 | end |
33 | do | 33 | do |
34 | local _with_0 | 34 | local _with_0 |
35 | if create ~= nil then | 35 | do |
36 | _with_0 = create(b, "new") | 36 | local _obj_0 = create |
37 | if _obj_0 ~= nil then | ||
38 | _with_0 = _obj_0(b, "new") | ||
39 | end | ||
37 | end | 40 | end |
38 | _with_0.value = 123 | 41 | _with_0.value = 123 |
39 | print(_with_0:work()) | 42 | print(_with_0:work()) |
40 | end | 43 | end |
41 | if f ~= nil then | 44 | do |
42 | f(123) | 45 | local _obj_0 = f |
46 | if _obj_0 ~= nil then | ||
47 | _obj_0(123) | ||
48 | end | ||
43 | end | 49 | end |
44 | if f2 ~= nil then | 50 | do |
45 | f2((function() | 51 | local _obj_0 = f2 |
46 | if f1 ~= nil then | 52 | if _obj_0 ~= nil then |
47 | return f1("abc") | 53 | _obj_0((function() |
48 | end | 54 | local _obj_1 = f1 |
49 | return nil | 55 | if _obj_1 ~= nil then |
50 | end)()) | 56 | return _obj_1("abc") |
57 | end | ||
58 | return nil | ||
59 | end)()) | ||
60 | end | ||
51 | end | 61 | end |
52 | local c | 62 | local c |
53 | if f2 ~= nil then | 63 | do |
54 | c = f2((function() | 64 | local _obj_0 = f2 |
55 | if f1 ~= nil then | 65 | if _obj_0 ~= nil then |
56 | return f1("abc") | 66 | c = _obj_0((function() |
57 | end | 67 | local _obj_1 = f1 |
58 | return nil | 68 | if _obj_1 ~= nil then |
59 | end)()) | 69 | return _obj_1("abc") |
70 | end | ||
71 | return nil | ||
72 | end)()) | ||
73 | end | ||
60 | end | 74 | end |
61 | local f | 75 | local f |
62 | f = function() | 76 | f = function() |