Skip to content

Make sure to allow '@objc' on enum elements #18910

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

Merged
merged 2 commits into from
Aug 23, 2018

Conversation

jrose-apple
Copy link
Contributor

Previously enum elements were ignored by the checking of @objc, but in the refactoring to a request (#17976) the attribute started getting marked as invalid without a diagnostic.

Why didn't we catch this sooner? Because it turns out we were serializing invalid attributes, which is definitely a bug because they'd be deserialized as valid. So, stop doing that too.

rdar://problem/43401047

Previously they were ignored by the checking of '@objc', but in the
refactoring to a request the attribute started getting marked as
invalid without a diagnostic.

rdar://problem/43401047
This isn't just an optimization; we weren't recording that the
attribute was invalid, and so it was getting /treated as valid/ when
the module was imported into a client later.

This would have caught the issue fixed by the previous commit.
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test source compatibility

@jrose-apple jrose-apple merged commit fac49cb into swiftlang:master Aug 23, 2018
@jrose-apple jrose-apple deleted the case-the-joint branch August 23, 2018 01:08
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.

2 participants