[SR-310] Int fails to convert to protocol adopted values on linux #42932
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
runtime
The Swift Runtime
standard library
Area: Standard library umbrella
Additional Detail from JIRA
md5: 2b0be59f3dc3ff323834379e44b7c7c2
is duplicated by:
Issue Description:
This works on Darwin hosts but not linux:
protocol _NSObjectRepresentable {
func _nsObjectRepresentation() -> NSObject
}
extension Int : _NSObjectRepresentable {
func _nsObjectRepresentation() -> NSObject {
return _bridgeToObject()
}
}
if let obj = value as? _NSObjectRepresentable {
print("darwin gets here")
} else {
print("linux gets here")
}
see commit apple/swift-corelibs-foundation@877a052 to account for the failure case
The text was updated successfully, but these errors were encountered: