-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
SE-0072: Fully eliminate implicit bridging conversions from Swift #2419
Conversation
Per Swift Evolution proposal SE-0072, these changes prevent the compiler from introducing implicit bridging conversions during type checking.
@swift-ci Please test |
self.z = SCNFloat(z) | ||
self.x = SCNFloat(x as NSNumber) | ||
self.y = SCNFloat(y as NSNumber) | ||
self.z = SCNFloat(z as NSNumber) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I don't think that was intended.
#if os(OSX)
public typealias SCNFloat = CGFloat
#elseif os(iOS) || os(tvOS)
public typealias SCNFloat = Float
#endif
Given this definition, this was intended as a plain conversion, not a bridge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed - debugging in, though, we've definitely been introducing this conversion implicitly. I've filed SR-1432 to track my investigation of what's been going on.
I'm amazed how few of these we had in the testsuite. |
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
@swift-ci Please ASAN test |
@swift-ci smoke test OS X platform |
@swift-ci smoke test OS X platform |
@swift-ci Please test |
The failing smoke tests should be fixed by @lattner's recent commits, so this is now safe to merge. |
SE-0072: Fully eliminate implicit bridging conversions from Swift
Per Swift Evolution proposal SE-0072, these changes prevent the compiler from introducing implicit bridging conversions during type checking.