Skip to content

Sema: Explicitly check for 'inout' parameters on @objc functions #17236

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
Jun 15, 2018

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Jun 15, 2018

Fixes rdar://problem/41129106.

Note that this fixes a regression from a change that's only on master; I'm not cherry-picking this into 4.2 branch, where we already catch this error, just with a worse diagnostic.

Previously we would produce a non-specific diagnostic about the
parameter type not being representable in Objective-C because
VarDecl::getType() wrapped the result in an InOutType.

Now that this is no longer the case we have to check for inout
independently of looking at the type.

Fixes <rdar://problem/41129106>.
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov merged commit e785319 into swiftlang:master Jun 15, 2018
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.

1 participant