aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2024-09-03 23:23:25 +0800
committerLi Jin <dragon-fly@qq.com>2024-09-03 23:23:25 +0800
commit2f8215df7288e0aac690c8e8b1ff79865f114302 (patch)
tree2fc316ec0d6ca82123dc1fbc2012d8eeb3bc8427 /spec/inputs
parent880b7eb9a427b263091f6eef5197c0285c723fd7 (diff)
downloadyuescript-0.25.0.tar.gz
yuescript-0.25.0.tar.bz2
yuescript-0.25.0.zip
fix correct evaluation order for multi-value assignments.v0.25.0
Diffstat (limited to 'spec/inputs')
-rw-r--r--spec/inputs/destructure.yue8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/inputs/destructure.yue b/spec/inputs/destructure.yue
index 5017ee1..674dfe4 100644
--- a/spec/inputs/destructure.yue
+++ b/spec/inputs/destructure.yue
@@ -7,6 +7,14 @@ do
7 { :hello, :world } = value 7 { :hello, :world } = value
8 8
9do 9do
10 x, [a, b] = f!
11 print x, a, b
12
13do
14 list = [ [1, 2], [3, 4]]
15 {x, y}, list = lume.first(list), lume.slice list, 2
16
17do
10 { yes: no, thing } = world 18 { yes: no, thing } = world
11 19
12 {:a,:b,:c,:d} = yeah 20 {:a,:b,:c,:d} = yeah