[Parser] String interpolation accepts invalid argument label syntax without expression #80927
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
The interpolated string "(1, f:)" compiles without error, despite f: being an argument label with no following expression.
Reproduction
compile the following code.
Expected behavior
Should be compile error. Diagnosis should output
expected expression in list of expressions
.Environment
Additional information
Regression of trailing comma
It seems to be regression of SE-0439 Allow trailing comma in comma-separated lists. PR.
When we compile the code in Swift 6.0.3, correctly output the error
expected expression in list of expressions
ASTGen assertion
Plus I got assertion error between ASTGen parser and c++ parser
The text was updated successfully, but these errors were encountered: