[SR-5959] Compilation issue after migrating from Xcode 8.3 to Xcode 9 #48518
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 4.0
type checker
Area → compiler: Semantic analysis
Attachment: Download
Environment
Xcode 9.0 (9A235)
macOS Sierra 10.12.6
Additional Detail from JIRA
md5: 6ae8222c8069cd64edfa5fa1d163e628
Issue Description:
Xcode 9 fails to compile the code which was compiling just fine in Xcode 8.3
Attached a reduced use case.
There is an Objective-C category which implements a protocol. The protocol defines two methods, one class method and one instance method with the same signature.
Example:
This category is used in a Swift class:
Xcode 9 shows a compilation issue:
The simple workaround is to change the order in which the methods are declared in the protocol, from this:
To this:
After this change the code compiles just fine.
The text was updated successfully, but these errors were encountered: