mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.
20 lines
310 B
Swift
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()
|
|
// }
|
|
}
|