diff options
Diffstat (limited to 'spec/outputs/nil_coalescing.lua')
-rw-r--r-- | spec/outputs/nil_coalescing.lua | 96 |
1 files changed, 42 insertions, 54 deletions
diff --git a/spec/outputs/nil_coalescing.lua b/spec/outputs/nil_coalescing.lua index e1547df..2279853 100644 --- a/spec/outputs/nil_coalescing.lua +++ b/spec/outputs/nil_coalescing.lua | |||
@@ -1,23 +1,19 @@ | |||
1 | do | 1 | do |
2 | local a | 2 | local a |
3 | do | 3 | local _exp_0 = b |
4 | local _exp_0 = b | 4 | if _exp_0 ~= nil then |
5 | if _exp_0 ~= nil then | 5 | a = _exp_0 |
6 | a = _exp_0 | 6 | else |
7 | else | 7 | a = c |
8 | a = c | ||
9 | end | ||
10 | end | 8 | end |
11 | end | 9 | end |
12 | do | 10 | do |
13 | local a | 11 | local a |
14 | do | 12 | local _exp_0 = b |
15 | local _exp_0 = b | 13 | if _exp_0 ~= nil then |
16 | if _exp_0 ~= nil then | 14 | a = _exp_0.a |
17 | a = _exp_0.a | 15 | else |
18 | else | 16 | a = c.a |
19 | a = c.a | ||
20 | end | ||
21 | end | 17 | end |
22 | end | 18 | end |
23 | do | 19 | do |
@@ -50,23 +46,21 @@ do | |||
50 | end | 46 | end |
51 | do | 47 | do |
52 | local a | 48 | local a |
53 | do | 49 | local _exp_0 = b |
54 | local _exp_0 = b | 50 | if _exp_0 ~= nil then |
55 | if _exp_0 ~= nil then | 51 | a = _exp_0 |
56 | a = _exp_0 | 52 | else |
57 | else | 53 | do |
58 | do | 54 | local _exp_1 = c |
59 | local _exp_1 = c | 55 | if _exp_1 ~= nil then |
60 | if _exp_1 ~= nil then | 56 | a = _exp_1 |
61 | a = _exp_1 | 57 | else |
62 | else | 58 | do |
63 | do | 59 | local _exp_2 = d |
64 | local _exp_2 = d | 60 | if _exp_2 ~= nil then |
65 | if _exp_2 ~= nil then | 61 | a = _exp_2 |
66 | a = _exp_2 | 62 | else |
67 | else | 63 | a = e |
68 | a = e | ||
69 | end | ||
70 | end | 64 | end |
71 | end | 65 | end |
72 | end | 66 | end |
@@ -84,18 +78,14 @@ do | |||
84 | end)()) | 78 | end)()) |
85 | end | 79 | end |
86 | do | 80 | do |
87 | do | 81 | local _with_0 |
88 | local _with_0 | 82 | local _exp_0 = funcA() |
89 | do | 83 | if _exp_0 ~= nil then |
90 | local _exp_0 = funcA() | 84 | _with_0 = _exp_0 |
91 | if _exp_0 ~= nil then | 85 | else |
92 | _with_0 = _exp_0 | 86 | _with_0 = funcB() |
93 | else | ||
94 | _with_0 = funcB() | ||
95 | end | ||
96 | end | ||
97 | print(_with_0.field) | ||
98 | end | 87 | end |
88 | print(_with_0.field) | ||
99 | end | 89 | end |
100 | do | 90 | do |
101 | local a = 1 + 2 + (function() | 91 | local a = 1 + 2 + (function() |
@@ -137,18 +127,16 @@ do | |||
137 | end | 127 | end |
138 | do | 128 | do |
139 | local a | 129 | local a |
140 | do | 130 | local _exp_0 = 1 |
141 | local _exp_0 = 1 | 131 | if _exp_0 ~= nil then |
142 | if _exp_0 ~= nil then | 132 | a = _exp_0 |
143 | a = _exp_0 | 133 | else |
144 | else | 134 | do |
145 | do | 135 | local _exp_1 = 2 |
146 | local _exp_1 = 2 | 136 | if _exp_1 ~= nil then |
147 | if _exp_1 ~= nil then | 137 | a = _exp_1 |
148 | a = _exp_1 | 138 | else |
149 | else | 139 | a = 3 |
150 | a = 3 | ||
151 | end | ||
152 | end | 140 | end |
153 | end | 141 | end |
154 | end | 142 | end |