You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/attr/attr_override.swift
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -587,7 +587,7 @@ class SR_4206_Base_7<T> {
587
587
}
588
588
589
589
classSR_4206_Derived_7<T>:SR_4206_Base_7<T>{
590
-
overridefunc foo1()where T:SR_4206_Protocol_2{} // expected-error {{overridden method 'foo1' has generic signature <T where T : SR_4206_Protocol_2> which is incompatible with base method's generic signature <T where T : SR_4206_Protocol_1>; expected generic signature to be <T where τ_0_0 : SR_4206_Protocol_1>}}
590
+
overridefunc foo1()where T:SR_4206_Protocol_2{} // expected-error {{overridden method 'foo1' has generic signature <T where T : SR_4206_Protocol_2> which is incompatible with base method's generic signature <T where T : SR_4206_Protocol_1>; expected generic signature to be <T where T : SR_4206_Protocol_1>}}
591
591
592
592
overridefunc foo2(){} // OK
593
593
}
@@ -624,7 +624,7 @@ class SR_4206_Base_10<T> {
624
624
func foo()where T:SR_4206_Protocol_1{} // expected-note {{overridden declaration is here}}
625
625
}
626
626
classSR_4206_Derived_10<T, U>:SR_4206_Base_10<T>{
627
-
overridefunc foo()where U:SR_4206_Protocol_1{} // expected-error {{overridden method 'foo' has generic signature <T, U where U : SR_4206_Protocol_1> which is incompatible with base method's generic signature <T where T : SR_4206_Protocol_1>; expected generic signature to be <T, U where τ_0_0 : SR_4206_Protocol_1>}}
627
+
overridefunc foo()where U:SR_4206_Protocol_1{} // expected-error {{overridden method 'foo' has generic signature <T, U where U : SR_4206_Protocol_1> which is incompatible with base method's generic signature <T where T : SR_4206_Protocol_1>; expected generic signature to be <T, U where T : SR_4206_Protocol_1>}}
0 commit comments