ninja fix: don't use external arg parsing in rest spread lists
This commit is contained in:
parent
993c7c09d4
commit
307a7538c8
|
@ -1159,6 +1159,10 @@ pub fn parse_internal_call(
|
||||||
call.add_positional(Expression::garbage(working_set, arg_span));
|
call.add_positional(Expression::garbage(working_set, arg_span));
|
||||||
} else {
|
} else {
|
||||||
let rest_shape = match &signature.rest_positional {
|
let rest_shape = match &signature.rest_positional {
|
||||||
|
Some(arg) if matches!(arg.shape, SyntaxShape::ExternalArgument) => {
|
||||||
|
// External args aren't parsed inside lists in spread position.
|
||||||
|
SyntaxShape::Any
|
||||||
|
}
|
||||||
Some(arg) => arg.shape.clone(),
|
Some(arg) => arg.shape.clone(),
|
||||||
None => SyntaxShape::Any,
|
None => SyntaxShape::Any,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user