[SR-5166] typealias prevents compilation of generic protocol implementation #47742
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 4.0
Environment
Xcode 9.0 beta (9M136h) / Swift 4
Additional Detail from JIRA
md5: cfb76c549862be9e9b6052ff16e701c6
relates to:
Issue Description:
I've experienced a problem during Swift 3.1 to Swift 4 codebase migration.
The problem arrises when I try to implement a generic protocol method that takes a closure with a generic parameter with a protocol as an associated type.
The following code works fine in Swift 3.1:
However in Swift 4 compiler gives me an error about class
Foo
not conforming to protocolFooType
withfoo(action: )
method implementation missing.By the way Xcode 9 "fix-it" generates the same implementation I have.
It's possible to workaround the issue by removing the line
which is ok since type inference does its job, but nevertheless it should be a valid code.
The text was updated successfully, but these errors were encountered: