mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This might look like a regression in lazyness at first sight, however this was previously being done implicitly by checking the 'Self := Adoptee' substitution against the protocol's generic signature, back when generic signatures had expanded requirements for protocol associated types. When generic signature minimization was switched on, this was no longer being done, as a result it was possible to construct code that would fail in the specializer with a missing conformance.
15 lines
295 B
Swift
15 lines
295 B
Swift
public protocol Base {}
|
|
public protocol Derived : Base {}
|
|
|
|
public protocol HasAssocType {
|
|
associatedtype T : Derived
|
|
|
|
var value: T { get }
|
|
}
|
|
|
|
public class ConcreteDerived : Derived {}
|
|
|
|
public class ConcreteHasAssocType : HasAssocType {
|
|
public var value: ConcreteDerived { fatalError() }
|
|
}
|