[SR-14985] Compiler warning of 'nearly matched' default protocol requirement in extension #57327
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
This reproduces in Swift 5.2, 5.3, 5.4, and 5.5 as of Xcode 13 Beta 1 (13A5154h)
Additional Detail from JIRA
md5: 192ed9136566057f1be0fa4572a0db2f
Issue Description:
The following code shows a difference in how the compiler treats protocol conformances when the requirement is a defaulted one and the conformer's implementation is an optional covariant, depending on if it's provided in the base implementation or an extension
This is surprising and "annoying" as it disallows certain practices of grouping code
The text was updated successfully, but these errors were encountered: