File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,14 @@ extension K {
50
50
func replacement_finalFunction( ) { }
51
51
}
52
52
53
+ extension undeclared { // expected-error{{use of undeclared type 'undeclared'}}
54
+ @_dynamicReplacement ( for: property)
55
+ var replacement_property : Int { return 2 }
56
+
57
+ @_dynamicReplacement ( for: func)
58
+ func func2( ) -> Int { return 2 }
59
+ }
60
+
53
61
extension P {
54
62
@_dynamicReplacement ( for: v)
55
63
var replacement_v : Int {
Original file line number Diff line number Diff line change @@ -8,14 +8,14 @@ extension G {
8
8
}
9
9
}
10
10
11
- extension G {
12
- struct S < T> { // expected-note {{generic type 'S' declared here}}
11
+ extension { // expected-error {{expected type name in extension declaration}}
12
+ struct S < T> {
13
13
func foo( t: T ) { }
14
14
}
15
15
16
- class M : S { } // expected-error {{reference to generic type 'G<T>.S' requires arguments in <...>}}
16
+ class M : S { }
17
17
18
- protocol P { // expected-error {{protocol 'P' cannot be nested inside another declaration}}
18
+ protocol P {
19
19
associatedtype A
20
20
}
21
21
}
You can’t perform that action at this time.
0 commit comments