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/decl/ext/extensions.swift
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,14 @@ protocol NestingTest5 {
37
37
func nestingTest6(){
38
38
extensionFoo{} // expected-error {{declaration is only valid at file scope}}
39
39
}
40
+
extensionArray{
41
+
func foo(){
42
+
extensionArray{ // expected-error {{declaration is only valid at file scope}}
43
+
// FIXME: Confusing error
44
+
// expected-error@-2 {{constrained extension must be declared on the unspecialized generic type 'Array' with constraints specified by a 'where' clause}}
45
+
}
46
+
}
47
+
}
40
48
41
49
//===--- Test that we only allow extensions only for nominal types.
0 commit comments