diff options
author | Li Jin <dragon-fly@qq.com> | 2022-07-14 14:35:58 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-07-14 14:35:58 +0800 |
commit | f4147d5fea31438cfee3dc3781806a1a0b6c40c9 (patch) | |
tree | 407fc1db7fa5a40ee0e07b78c6f731e284e67237 /spec | |
parent | c6946ca162911036a19cc7c5deadb6d8c127755e (diff) | |
download | yuescript-f4147d5fea31438cfee3dc3781806a1a0b6c40c9.tar.gz yuescript-f4147d5fea31438cfee3dc3781806a1a0b6c40c9.tar.bz2 yuescript-f4147d5fea31438cfee3dc3781806a1a0b6c40c9.zip |
fix a case when doing optional destructuring for metatable.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/inputs/switch.yue | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/inputs/switch.yue b/spec/inputs/switch.yue index 04bb02e..9e7ecfd 100644 --- a/spec/inputs/switch.yue +++ b/spec/inputs/switch.yue | |||
@@ -144,5 +144,10 @@ do | |||
144 | else | 144 | else |
145 | "should not reach here unless it is not a table" | 145 | "should not reach here unless it is not a table" |
146 | 146 | ||
147 | do | ||
148 | switch y | ||
149 | when {x: #:mt} | ||
150 | print mt | ||
151 | |||
147 | nil | 152 | nil |
148 | 153 | ||