[SR-10186] Swift 5 compiler automatic associatedtype resolution does not work #52588
Labels
associated type inference
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 5.0
type checker
Area → compiler: Semantic analysis
Attachment: Download
Environment
XCode version Version 10.2 (10E125), Mojave 10.14.4 (18E226)
Additional Detail from JIRA
md5: b343bbb0cb6e3110c64efc85f0951d0c
Issue Description:
In Swift 5 (and 4.2 compability mode) compiler automatic associatedtype resolution does not work. Compiles fine by swift 4.2 compiler in XCode 10.1.
Implementation of `checkTest(_ viewController: TestViewController, with context: String)` in `ProtocolImplementation` provides to the compiler all the necessary information about `ViewController`/`Context` types. Swift 5 compiler requires it to be specified manually:
PS: Worked as expected in the beta version of Xcode 10.2
The text was updated successfully, but these errors were encountered: