diff options
author | Li Jin <dragon-fly@qq.com> | 2024-09-03 23:23:25 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2024-09-03 23:23:25 +0800 |
commit | 2f8215df7288e0aac690c8e8b1ff79865f114302 (patch) | |
tree | 2fc316ec0d6ca82123dc1fbc2012d8eeb3bc8427 /spec/inputs | |
parent | 880b7eb9a427b263091f6eef5197c0285c723fd7 (diff) | |
download | yuescript-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.yue | 8 |
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 | ||
9 | do | 9 | do |
10 | x, [a, b] = f! | ||
11 | print x, a, b | ||
12 | |||
13 | do | ||
14 | list = [ [1, 2], [3, 4]] | ||
15 | {x, y}, list = lume.first(list), lume.slice list, 2 | ||
16 | |||
17 | do | ||
10 | { yes: no, thing } = world | 18 | { yes: no, thing } = world |
11 | 19 | ||
12 | {:a,:b,:c,:d} = yeah | 20 | {:a,:b,:c,:d} = yeah |