diff options
author | Li Jin <dragon-fly@qq.com> | 2022-02-09 10:52:49 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-02-09 10:52:49 +0800 |
commit | a66ec0d18eba6b38fad25cc88c82f7532d689670 (patch) | |
tree | d125105f8cde4e7a37ca407e7bccedea783a1127 /spec/inputs | |
parent | 07a64933f8d956a8bba401db2200e6f7d8244dc9 (diff) | |
download | yuescript-a66ec0d18eba6b38fad25cc88c82f7532d689670.tar.gz yuescript-a66ec0d18eba6b38fad25cc88c82f7532d689670.tar.bz2 yuescript-a66ec0d18eba6b38fad25cc88c82f7532d689670.zip |
fix a case nil coalesing used as update assignment.
Diffstat (limited to 'spec/inputs')
-rw-r--r-- | spec/inputs/nil_coalesing.yue | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/inputs/nil_coalesing.yue b/spec/inputs/nil_coalesing.yue index facd64c..76915c7 100644 --- a/spec/inputs/nil_coalesing.yue +++ b/spec/inputs/nil_coalesing.yue | |||
@@ -39,5 +39,10 @@ do | |||
39 | do | 39 | do |
40 | a = 1 ?? 2 ?? 3 | 40 | a = 1 ?? 2 ?? 3 |
41 | 41 | ||
42 | do | ||
43 | a.b.c ??= 1 | ||
44 | a = b.x ?? c.x ?? d.x | ||
45 | a.c ??= 1 | ||
46 | |||
42 | nil | 47 | nil |
43 | 48 | ||