Skip to content

Commit b7f5ac1

Browse files
committed
add test
1 parent 30046ca commit b7f5ac1

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

test/corpus/expressions.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,40 @@ switch c {
11081108
(expression_statement
11091109
(number)))))))
11101110

1111+
================================================================================
1112+
Switch of lazy patterns
1113+
================================================================================
1114+
1115+
switch c {
1116+
| lazy(r) => r
1117+
| (lazy (), lazy 3) => false
1118+
}
1119+
1120+
--------------------------------------------------------------------------------
1121+
1122+
(source_file
1123+
(expression_statement
1124+
(switch_expression
1125+
(value_identifier)
1126+
(switch_match
1127+
(lazy_pattern
1128+
(parenthesized_pattern
1129+
(value_identifier)))
1130+
(sequence_expression
1131+
(expression_statement
1132+
(value_identifier))))
1133+
(switch_match
1134+
(tuple_pattern
1135+
(tuple_item_pattern
1136+
(lazy_pattern
1137+
(unit)))
1138+
(tuple_item_pattern
1139+
(lazy_pattern
1140+
(number))))
1141+
(sequence_expression
1142+
(expression_statement
1143+
(false)))))))
1144+
11111145
================================================================================
11121146
Math operators
11131147
================================================================================

0 commit comments

Comments
 (0)