Skip to content

[SE-0160] Swift 3: Downgrade error about non-ObjC @(IB|GK)Inspectable properties #8772

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 1 commit into from
Apr 14, 2017

Conversation

DougGregor
Copy link
Member

@IBInspectable and @GKInspectable both work via the Objective-C
runtime. SE-0160 made them imply @objc, but doing so made it an error
to define an @IBInspectable or @GKInspectable property with a type
that could not be expressed in Objective-C. The attribute is useless,
but this broke Swift 3 code.

So, downgrade the error to a warning in Swift 3 compatibility mode,
with a Fix-It to remove the useless attribute. It remains an error in
Swift 4.

Fixes rdar://problem/31408971.

… properties

@IBInspectable and @GKInspectable both work via the Objective-C
runtime. SE-0160 made them imply @objc, but doing so made it an error
to define an @IBInspectable or @GKInspectable property with a type
that could not be expressed in Objective-C. The attribute is useless,
but this broke Swift 3 code.

So, downgrade the error to a warning in Swift 3 compatibility mode,
with a Fix-It to remove the useless attribute. It remains an error in
Swift 4.

Fixes rdar://problem/31408971.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit 54e1f83 into swiftlang:master Apr 14, 2017
@DougGregor DougGregor deleted the rdar-31408971 branch April 14, 2017 06:38
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