Files
swift-mirror/validation-test/Evolution/Inputs/conformance_reference.swift
Slava Pestov 71ab1bbe77 IRGen: Fix isResilientConformance() check
If the conforming type is generic, we have to treat the conformance as
resilient if it is defined outside of the current module.

This is because it can resiliently change from being non-dependent
to dependent.
2019-02-20 20:00:46 -05:00

36 lines
498 B
Swift

public func getVersion() -> Int {
#if BEFORE
return 0
#else
return 1
#endif
}
public protocol BaseProtocol {
#if AFTER
associatedtype Assoc = Self
#endif
}
public protocol DerivedProtocol : BaseProtocol {}
public struct FirstGeneric<T> : BaseProtocol {
public init() {}
}
public struct SecondGeneric<T> : DerivedProtocol {
public init() {}
}
extension BaseProtocol {
public func getMeAType() -> Any.Type {
#if BEFORE
return Self.self
#else
return Assoc.self
#endif
}
}