Skip to content

Commit 0894464

Browse files
committed
Add testcase for @_implements parser diagnostics.
1 parent 1b3815e commit 0894464

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// RUN: %target-swift-frontend -parse -verify %s
2+
3+
struct S0 {
4+
@_implements(1, Foo) // expected-error {{expected type}}
5+
func f() { }
6+
}
7+
8+
struct S1 {
9+
@_implements(NeedsF0, 1) // expected-error {{expected a member name as second parameter in '_implements' attribute}}
10+
func f() { }
11+
}
12+
13+
struct S2 {
14+
@_implements(NeedsF0) // expected-error {{expected ',' in '_implements' attribute}}
15+
func f() { }
16+
}

0 commit comments

Comments
 (0)