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
* Implement parser support for SE-0081 - Move 'where' clause to end of declaration
This patch includes testsuite changes to show each of the decls supported.
Next step is to migrate the stdlib + testsuite + corelibs: I'd would *greatly* appreciate help with this.
After that is done, deprecation + migration of the old form can happen.
* My recent patch "broke" these tests, but allowing the syntax in them to trigger existing generics bugs.
Copy file name to clipboardExpand all lines: test/decl/nested.swift
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,8 @@ class OuterNonGenericClass {
78
78
init(t:T){ super.init(); self.t = t }
79
79
}
80
80
81
-
classInnerGenericClass<U where U :Racoon, U.Stripes ==T>:OuterNonGenericClass{ // expected-error {{type 'InnerGenericClass' nested in generic function}}
81
+
classInnerGenericClass<U>:OuterNonGenericClass // expected-error {{type 'InnerGenericClass' nested in generic function}}
82
+
where U :Racoon, U.Stripes ==T{
82
83
lett:T
83
84
84
85
init(t:T){ super.init(); self.t = t }
@@ -151,7 +152,8 @@ class OuterGenericClass<T> {
151
152
init(t:T){ super.init(); self.t = t }
152
153
}
153
154
154
-
classInnerGenericClass<U where U :Racoon, U.Stripes ==T>:OuterGenericClass<U>{ // expected-error {{type 'InnerGenericClass' nested in generic function}}
155
+
classInnerGenericClass<U>:OuterGenericClass<U> // expected-error {{type 'InnerGenericClass' nested in generic function}}
0 commit comments