From 792e942f5269655ee03c48400999f3604b84396c Mon Sep 17 00:00:00 2001 From: Li Jin Date: Tue, 17 Aug 2021 16:21:39 +0800 Subject: fix issue #64. --- spec/inputs/destructure.yue | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'spec') diff --git a/spec/inputs/destructure.yue b/spec/inputs/destructure.yue index 7bf5a88..c46cef5 100644 --- a/spec/inputs/destructure.yue +++ b/spec/inputs/destructure.yue @@ -142,3 +142,32 @@ do {:a},b = a\if(123) + t, 123 +do + {:name = "nameless", :job = "jobless"} = person + + request = (url, options = {}) -> + { + :method = "GET" + :headers = {} + :parameters = {} + :payload = "" + :ok + :err + :final + } = options + res = makeRequest(url, method, parameters, payload, ok, err, final) + return res + + {key1: {key2: value1 = 123}, :key3 = "abc"} = tb + + {#: mt = {__index: {abc: 123}}, #: {:call# = (-> {}), :add#}} = tb + + {x: {#: mtx = {}}, :y, z: zItem, :index# = -> nil} = tb + + {#: {func: a.b(-> 123).c = item?.defVal}} = tb + +do + {#: mt = {}, sub#: subFunc} = tb.x + +do + {x: {#: mt = {}, sub#: subFunc}} = tb -- cgit v1.2.3-55-g6feb