Skip to content
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

Merged
merged 1 commit into from Sep 2, 2016

Conversation

nathanhosselton
Copy link
Contributor

This pull request seeks to add clarity to the error message that is displayed when a function type contains argument labels.

Resolves SR-2451.

@@ -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",
Copy link
Collaborator

@xwu xwu Aug 31, 2016

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"

@jckarter
Copy link
Member

LGTM, thanks @nathanhosselton !

@jckarter
Copy link
Member

@swift-ci Please smoke test

@jckarter
Copy link
Member

@nathanhosselton Looks like some tests need to be updated to expect the new diagnostic:

https://ci.swift.org/job/swift-PR-osx-smoke-test/1454/consoleFull#-1455303460ee1a197b-acac-4b17-83cf-a53b95139a76

@nathanhosselton
Copy link
Contributor Author

@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.

@nathanhosselton
Copy link
Contributor Author

Tests are now passing for me. Should be good to go.

@jckarter
Copy link
Member

jckarter commented Sep 1, 2016

Thanks @nathanhosselton! Let me try again.

@jckarter
Copy link
Member

jckarter commented Sep 1, 2016

@swift-ci Please smoke test

@jckarter jckarter self-assigned this Sep 1, 2016
@jckarter
Copy link
Member

jckarter commented Sep 1, 2016

@shahmishal Linux CI seems to be down, or at least, not reporting status. Do you mind merging this?

@gottesmm
Copy link
Member

gottesmm commented Sep 2, 2016

@swift-ci Please smoke test linux

@jckarter jckarter merged commit 22a5230 into apple:master Sep 2, 2016
@jckarter
Copy link
Member

jckarter commented Sep 2, 2016

Looks good now. Thanks @nathanhosselton!

@nathanhosselton
Copy link
Contributor Author

Thanks, @jckarter! Want me to close SR-2451?

@jckarter
Copy link
Member

jckarter commented Sep 2, 2016

Sure, go ahead.

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.

None yet

4 participants