@@ -1108,6 +1108,40 @@ switch c {
1108
1108
(expression_statement
1109
1109
(number)))))))
1110
1110
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
+
1111
1145
================================================================================
1112
1146
Math operators
1113
1147
================================================================================
0 commit comments