Files
swift-mirror/test/SILOptimizer/Inputs/specialize_inherited_multifile.swift
Slava Pestov dc49f82c2a Sema: Eagerly mark associated type conformances as used
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.
2016-09-06 11:52:24 -07:00

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() }
}