Closed blindFS closed 1 week ago
New test case of "match" with _ and if condition:
match $x { _ if $x == 4 => {}, _ => {} }
It will previously cause parsing error:
(nu_script ; [0, 0] - [4, 0] (ERROR ; [0, 0] - [3, 1] (val_variable ; [0, 6] - [0, 8] name: (identifier)) ; [0, 7] - [0, 8] (val_variable ; [1, 7] - [1, 9] name: (identifier)) ; [1, 8] - [1, 9] (val_number) ; [1, 13] - [1, 14] (ERROR) ; [1, 15] - [1, 16] (expr_binary ; [1, 18] - [2, 9] lhs: (val_record) ; [1, 18] - [1, 20] (ERROR) ; [2, 2] - [2, 5] rhs: (val_record)))) ; [2, 7] - [2, 9]
Good catch. Thanks!
New test case of "match" with _ and if condition:
It will previously cause parsing error: