mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When the type checker forms a GenericSignatureBuilder to process requirements, the GSB may look up concrete conformances. Route such requests through TypeChecker::conformsToProtocol() so they can be marked as used. This fixes multi-file scenarios where conformances from another file might be used only in a generic signature in the primary file, e.g., rdar://problem/31759258.
8 lines
190 B
Swift
8 lines
190 B
Swift
// RUN: %target-swift-frontend -emit-ir %S/Inputs/for_each_conformance_crashB.swift -primary-file %s -o -
|
|
|
|
extension Q where A == MyStruct {
|
|
func foo() {
|
|
for _ in getArray() { }
|
|
}
|
|
}
|