aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/destructure.yue
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2023-12-07 23:49:48 +0800
committerLi Jin <dragon-fly@qq.com>2023-12-07 23:55:16 +0800
commit514b9f97febe8920a78d6078b092fe84b859a963 (patch)
tree8c76ba7579f69db7e2c899e4713009b910e0fa89 /spec/inputs/destructure.yue
parenta1d719e3bbfe8cd39c05d2a8f49143b9e814f876 (diff)
downloadyuescript-0.21.0.tar.gz
yuescript-0.21.0.tar.bz2
yuescript-0.21.0.zip
changed the if-assignment syntax to prevent some errors.v0.21.0
Diffstat (limited to 'spec/inputs/destructure.yue')
-rw-r--r--spec/inputs/destructure.yue8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/inputs/destructure.yue b/spec/inputs/destructure.yue
index 73e4d33..5017ee1 100644
--- a/spec/inputs/destructure.yue
+++ b/spec/inputs/destructure.yue
@@ -94,18 +94,18 @@ do
94 94
95do 95do
96 thing = nil 96 thing = nil
97 if {a} = thing 97 if {a} := thing
98 print a 98 print a
99 else 99 else
100 print "nothing" 100 print "nothing"
101 101
102 thang = {1,2} 102 thang = {1,2}
103 if {a,b} = thang 103 if {a,b} := thang
104 print a,b 104 print a,b
105 105
106 if {a,b} = thing 106 if {a,b} := thing
107 print a,b 107 print a,b
108 elseif {c,d} = thang 108 elseif {c,d} := thang
109 print c,d 109 print c,d
110 else 110 else
111 print "NO" 111 print "NO"