Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0139-rdar36278079.swift
Doug Gregor 8146d25641 [Conformance checking] Diagnose missing witnesses along "lazy" paths.
When lazily resolving witnesses, we would fail to diagnose missing
witnesses for which we had no specific diagnostic to give, leading to
AST verifier errors and crashes later on. Make sure we call the
operation to diagnose missing witnesses along these paths, too.

Fixes SR-7364 / rdar://problem/39239629 as well as the older
rdar://problem/36278079.
2018-04-20 11:17:21 -07:00

20 lines
310 B
Swift

// RUN: not %target-swift-frontend -typecheck %s
struct S {
// presence of a static instance seems to be
// necessary to cause this problem
static let s = S()
}
protocol P {
associatedtype T
init(t: T)
}
extension S: P {
// Uncomment to stop assertion:
// init(t: Int) {
// self = S()
// }
}