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
[SR-2451] Clarify function_type_argument_label error msg #4575
Conversation
@@ -620,7 +620,7 @@ ERROR(expected_type_before_arrow,none, | |||
ERROR(expected_type_after_arrow,none, | |||
"expected type after '->'", ()) | |||
ERROR(function_type_argument_label,none, | |||
"function types cannot have argument label %0; use '_' instead", | |||
"function types cannot have argument labels; use '_' before %0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about even more explicit, something like: "function types must omit argument labels; use '_ %0' instead"
LGTM, thanks @nathanhosselton ! |
@swift-ci Please smoke test |
@nathanhosselton Looks like some tests need to be updated to expect the new diagnostic: |
@jckarter Apologies. I made the poor assumption that nothing would depend on the original string and skipped the tests. Lesson learned: never skip the tests. Will fix it up. |
aea60a9
to
c681487
Compare
Tests are now passing for me. Should be good to go. |
Thanks @nathanhosselton! Let me try again. |
@swift-ci Please smoke test |
@shahmishal Linux CI seems to be down, or at least, not reporting status. Do you mind merging this? |
@swift-ci Please smoke test linux |
Looks good now. Thanks @nathanhosselton! |
Sure, go ahead. |
This pull request seeks to add clarity to the error message that is displayed when a function type contains argument labels.
Resolves SR-2451.