From ef0ff9c4c523980d71e49d65e8db57d670daf85c Mon Sep 17 00:00:00 2001 From: Li Jin Date: Mon, 5 Feb 2024 10:27:47 +0800 Subject: fix more invalid in-expression use cases. --- spec/inputs/in_expression.yue | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'spec/inputs') diff --git a/spec/inputs/in_expression.yue b/spec/inputs/in_expression.yue index 6faff4e..7ee0816 100644 --- a/spec/inputs/in_expression.yue +++ b/spec/inputs/in_expression.yue @@ -35,5 +35,44 @@ do check -> return x in tb check -> x not in tb +do + f1 = -> + a = 2 + a in [ + 1 + 2 + 3 + 4 + ] + f2 = -> + a not in [ + 1 + 2 + 3 + 4 + ] + f3 = -> + a = 2 + a in { b, c, d + e, f + g + } + f4 = -> + a = 2 + b = a in [ 1, 2 + 3, 4 + ] + f5 = -> + a = 2 + return a in [ 1, 2 + 3, 4 + ] + f6 = -> + b = a not in { + 1 + 2 + x: 3 + } + nil -- cgit v1.2.3-55-g6feb