Skip to content

Conversation

@kubamracek
Copy link
Contributor

No description provided.

@kubamracek
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

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

lgtm.
Just a small comment about the wording.

ERROR(non_final_generic_class_function,none,
"classes cannot have non-final generic fuctions in embedded Swift", ())
ERROR(embedded_swift_existential_type,none,
"Existential type %0 is unavailable in embedded Swift", (Type))
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: I think we don't use "existential" as user facing term. There are a few other error messages which contain "existential", but I think it's better to call it "protocol-type" or "protocol as type", like it's done for other sema error messages.

Copy link
Contributor

Choose a reason for hiding this comment

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

value of protocol type %0 is what we use in Sema.

Another nit: the message shouldn't be capitalized.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about this wording?

 ERROR(embedded_swift_existential_type,none,
       "using values of protocol type %0 is not allowed in embedded Swift", (Type))
 ERROR(embedded_swift_existential,none,
       "using values of protocol types is not allowed in embedded Swift", ())

@kubamracek
Copy link
Contributor Author

@swift-ci please test

ERROR(embedded_swift_existential_type,none,
"using values of protocol type %0 is not allowed in embedded Swift", (Type))
ERROR(embedded_swift_existential,none,
"using values of protocol types is not allowed in embedded Swift", ())
Copy link
Contributor

Choose a reason for hiding this comment

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

How about cannot use a value of protocol type %0 in embedded Swift? this aligns better with the rest of the diagnostic we have.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That sounds great, let's go with that. Thanks!

@kubamracek kubamracek added the embedded Embedded Swift label Oct 14, 2023
@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek kubamracek force-pushed the embedded-existential-diag branch from d6a4cad to 30046b1 Compare October 14, 2023 21:04
@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek kubamracek merged commit b257a02 into swiftlang:main Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

embedded Embedded Swift

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants