[SR-2159] Cannot use Swift.Error protocol in ObjC protocols #44767
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 3.0
Environment
Xcode 8 b3, Swift 2016-07-24
Additional Detail from JIRA
md5: 3e4684037e7f9853c70fc620aeb1fce0
relates to:
Issue Description:
NSError is supposed to be replaced by Error in Swift 3.0, so this affects how ObjC methods are imported into Swift. Unfortunately there is a compiler assertion preventing the compilation of classes that want to conform to ObjC protocols containing NSError as an argument.
Reproducible example of bug: https://github.com/colemancda/SR-2159
Assertion failed: (PD->isObjC() || *PD->getKnownProtocolKind() == KnownProtocolKind::AnyObject), function forwardDeclare, file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift/lib/PrintAsObjC/PrintAsObjC.cpp, line 1633.
The text was updated successfully, but these errors were encountered: