Files
swift-mirror/test/multifile/for_each_conformance_crash.swift
Doug Gregor 449aa2f6b4 Mark conformances as "used" when the GenericSignatureBuilder needs them.
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.
2017-04-21 22:36:28 -07:00

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