[SR-6521] Compiler fails to see a custom initializer in a protocol #49071
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
type checker
Area → compiler: Semantic analysis
Environment
Tested on Xcode 9.1 and Xcode 9.2 beta 2
Additional Detail from JIRA
md5: 72ec1dd83dbe17b9474d41b9caf4ddf8
duplicates:
Issue Description:
When defining a custom initializer in a protocol with a class constraint on Self, the compiler doesn't see the custom initializer and tries to use one of the initializers of the class constraint.
Conditions for a compilation failure:
Below is a sample code to reproduce the issue. Change the definition of
BaseClass
to trigger the compilation issue.The text was updated successfully, but these errors were encountered: