Skip to content

Conversation

@millenomi
Copy link
Contributor

This patch adopts 'as' bridging on Linux. It requires swiftlang/swift#16022 — see that PR for more details.

}

extension AffineTransform : _ObjectTypeBridgeable {
extension AffineTransform : _ObjectiveCBridgeable {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main change is removing the parallel type _ObjectTypeBridgeable and replacing it with the newly-exposed-on-Linux _ObjectiveCBridgeable.

}

public // COMPILER_INTRINSIC
func _convertNSErrorToError(_ error: NSError?) -> Error {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Converting Error to NSError and back is in scope, but support is WIP.

@parkera
Copy link
Contributor

parkera commented Apr 19, 2018

Ultimately we should also change NSJSONSerialization to create the NS types to finally fix the NSNumber casting problem described in the forum post. I think it can be a follow-up to this though.

NSPropertyListSerialization can probably lose its eager conversion as well.

@millenomi millenomi changed the title [WIP] Adopt ‘as’ bridging on Linux. Adopt ‘as’ bridging on Linux. May 17, 2018
@parkera
Copy link
Contributor

parkera commented May 17, 2018

Looks good!

@millenomi
Copy link
Contributor Author

@swift-ci please test and merge

@benlangmuir
Copy link
Contributor

The corresponding compiler change in had to be reverted.

@benlangmuir
Copy link
Contributor

I canceled the "and merge" build in CI so that this wouldn't be automatically merged. I think the underlying linux test will continue though.

@millenomi
Copy link
Contributor Author

On hold as we figure out the 14.04 issues on the compiler patch.

@millenomi
Copy link
Contributor Author

Please test with the following:
swiftlang/swift#16736

@swift-ci please test

@millenomi
Copy link
Contributor Author

Please test with the following:
swiftlang/swift#16736

@swift-ci please test

@millenomi
Copy link
Contributor Author

Please test with the following:
swiftlang/swift#16736

@swift-ci please test

@millenomi
Copy link
Contributor Author

Simultaneous merging with swiftlang/swift#16736 imminent…

return val._bridgeToAnyObject() as! NSObject
} else {
return _SwiftValue(value)
return (value as AnyObject) as! NSObject
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this change leads to crash in cases like this:

class A {}
let array: NSArray = [A()]

Copy link
Contributor

Choose a reason for hiding this comment

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

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.

4 participants