mirror of
https://github.com/apple/swift.git
synced 2026-09-28 10:03:29 +02:00
The assertion here should have been an `if` statement, because it's possible to hit this where a type declares conformances to all of the protocols but one of the conformances happens to be invalid. Fixing this stops our previous fix from re-breaking one of the compiler crashers in the validation test. Additionally, one of the current compiler crashers was fixed by our previous change, so move it to the right place and tweak it to test that it is still fixed. rdar://178854703
11 lines
492 B
Swift
11 lines
492 B
Swift
// {"kind":"typecheck","original":"b9eafd0d","signature":"swift::constraints::ContextualFailure::tryProtocolConformanceFixIt() const","signatureAssert":"Assertion failed: (!missingProtoTypeStrings.empty() && \"type already conforms to all the protocols?\"), function tryProtocolConformanceFixIt","signatureNext":"ContextualFailure::tryFixIts"}
|
|
// RUN: not %target-swift-frontend -typecheck %s
|
|
protocol a<b> {
|
|
associatedtype b
|
|
}
|
|
struct c: a {
|
|
var d: a<Int> = {
|
|
c(<#expression#>)
|
|
}
|
|
}
|