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