diff options
author | Li Jin <dragon-fly@qq.com> | 2024-02-05 14:52:29 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2024-02-05 14:52:29 +0800 |
commit | 5ef5cff3efd030eb440133b5e4b2925bb9fe8ead (patch) | |
tree | a563ad80b12777dfcb920c21e2a00b201252b7aa /spec | |
parent | 018b9408f167067c596fc23781bc945edb9f4d89 (diff) | |
download | yuescript-5ef5cff3efd030eb440133b5e4b2925bb9fe8ead.tar.gz yuescript-5ef5cff3efd030eb440133b5e4b2925bb9fe8ead.tar.bz2 yuescript-5ef5cff3efd030eb440133b5e4b2925bb9fe8ead.zip |
fix an empty check case.v0.21.8
Diffstat (limited to 'spec')
-rw-r--r-- | spec/inputs/in_expression.yue | 4 | ||||
-rw-r--r-- | spec/outputs/in_expression.lua | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/spec/inputs/in_expression.yue b/spec/inputs/in_expression.yue index 0b2a87a..e854083 100644 --- a/spec/inputs/in_expression.yue +++ b/spec/inputs/in_expression.yue | |||
@@ -72,6 +72,8 @@ do | |||
72 | 2 | 72 | 2 |
73 | x: 3 | 73 | x: 3 |
74 | } | 74 | } |
75 | 75 | print a in [] | |
76 | a = 1 | ||
77 | print a in {} | ||
76 | nil | 78 | nil |
77 | 79 | ||
diff --git a/spec/outputs/in_expression.lua b/spec/outputs/in_expression.lua index b99be8a..3ccab0c 100644 --- a/spec/outputs/in_expression.lua +++ b/spec/outputs/in_expression.lua | |||
@@ -206,5 +206,11 @@ do | |||
206 | b = not _find_0 | 206 | b = not _find_0 |
207 | end | 207 | end |
208 | end | 208 | end |
209 | print((function() | ||
210 | local _val_0 = a | ||
211 | return false | ||
212 | end)()) | ||
213 | local a = 1 | ||
214 | print((false)) | ||
209 | end | 215 | end |
210 | return nil | 216 | return nil |