OSDN Git Service

2011-10-18 Janus Weil <janus@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / objc.dg / invalid-method-2.m
1 /* { dg-do compile } */
2
3 /* Test that using an invalid type in a method declaration produces a
4    friendly error without a compiler crash.  */
5
6 @interface MyClass
7 @end
8
9 @implementation MyClass
10 - (x) method /* { dg-error "unknown type name" } */
11 {
12   return 0;
13 }
14 - (id) method2: (x)argument /* { dg-error "unknown type name" } */
15 {
16   return 0;
17 }
18 @end