[SR-7429] Cannot conform a non-final class to a protocol with a defaulted requirement with a generic placeholder constrained to an associated type #49972
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 4.1
Environment
Swift version 4.2-dev (LLVM 064f71a292, Clang 238f385323, Swift 18b28b9)
Target: x86_64-apple-darwin17.5.0
Additional Detail from JIRA
md5: 358353b1fcad620d1abf6070b802116e
duplicates:
relates to:
Issue Description:
The following compiles in Swift 4.0.3, but not in 4.1:
Marking
C
asfinal
or making it astruct
, as well as removing the associated type constraint onfoo
makes the code compile again in 4.1.Note that this regression impacts conformance of a non-final class to
RangeReplacableCollection
:The two commented lines (the
required init
andappend(contentsOf:)
) need to be uncommented for the code to compile in 4.1.The text was updated successfully, but these errors were encountered: