We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 13b0fa9 + 31570f3 commit 57f7f07Copy full SHA for 57f7f07
test/decl/circularity.swift
@@ -85,3 +85,20 @@ class C3: G1<A>, P {
85
override func run(a: A) {}
86
// expected-error@-1 {{method does not override any method from its superclass}}
87
}
88
+
89
+// Another case that triggers circular override checking.
90
+protocol P1 {
91
+ associatedtype X = Int // expected-note {{through reference here}}
92
+ init(x: X)
93
+}
94
95
+class C4 {
96
+ required init(x: Int) {}
97
98
99
+class D4 : C4, P1 { // expected-note {{through reference here}}
100
+ required init(x: X) { // expected-error {{circular reference}}
101
+ // expected-note@-1 2{{through reference here}}
102
+ super.init(x: x)
103
+ }
104
0 commit comments