mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Fix parsing of signature inp/out types in predecls (#10642)
# Description Fixes https://github.com/nushell/nushell/issues/10605 (again). The loop looking for `[` to determine signature position didn't stop early enough, so it thought the second `[` denoting the inp/out types marks the beginning of the signature. # User-Facing Changes # Tests + Formatting adds a new `predecl_signature_multiple_inp_out_types` test # After Submitting
This commit is contained in:
@ -202,6 +202,7 @@ pub fn parse_def_predecl(working_set: &mut StateWorkingSet, spans: &[Span]) {
|
||||
.starts_with(&[b'('])
|
||||
{
|
||||
signature_pos = Some(pos);
|
||||
break;
|
||||
}
|
||||
|
||||
pos += 1;
|
||||
|
Reference in New Issue
Block a user