Skip to content

Emit diagnostic when missing label in function call #2442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

kimdv
Copy link
Contributor

@kimdv kimdv commented Jan 24, 2024

No description provided.

@kimdv kimdv self-assigned this Jan 24, 2024
@@ -1861,6 +1861,10 @@ extension Parser {
if self.atArgumentLabel(allowDollarIdentifier: true) && self.peek(isAt: .colon) {
(unexpectedBeforeLabel, label) = parseArgumentLabel()
colon = consumeAnyToken()
} else if let _colon = self.consume(if: .colon) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added _colon here otherwise it will clash with name with on 1860

@kimdv kimdv linked an issue Jan 24, 2024 that may be closed by this pull request
Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. LGTM

@ahoppen
Copy link
Member

ahoppen commented Jan 24, 2024

@swift-ci Please test

@kimdv kimdv merged commit fa9da0a into swiftlang:main Jan 25, 2024
@kimdv kimdv deleted the kimdv/2435-bad-diagnostic-if-function-call-is-missing-an-argument-label branch January 25, 2024 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad diagnostic if function call is missing an argument label
2 participants