aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs
diff options
context:
space:
mode:
Diffstat (limited to 'spec/inputs')
-rw-r--r--spec/inputs/destructure.yue10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/inputs/destructure.yue b/spec/inputs/destructure.yue
index 403923a..d161fd8 100644
--- a/spec/inputs/destructure.yue
+++ b/spec/inputs/destructure.yue
@@ -214,5 +214,15 @@ do
214 tb = {} 214 tb = {}
215 <[a + b]>: v1, [c!]: v2 = tb 215 <[a + b]>: v1, [c!]: v2 = tb
216 216
217do
218 {a: {:<add> = addFunc}, b: {<[fieldName]>: field = 123}} = tb
219 {<"abc">: meta_field = "def", <[[any string]]>: abc = 123, <'str'>: def = {}} = tb
220
221 switch tb
222 when {a: {:<add> = addFunc}, b: {<[fieldName]>: field = 123}}
223 print add, field
224 switch tb
225 when {c: {<"abc">: meta_field = "def"}, <[[any string]]>: {d: abc = 123}, <'str'>: {e: def = {}}}
226 print meta_field, abc, def
217nil 227nil
218 228