gcc/testsuite/objc.dg/invalid-method-1.m
raw| 1 | /* { dg-do compile } */ |
| 2 | /* Test that we keep compiling if a method definition is found outside |
| 3 | of an @implementation context. |
| 4 | */ |
| 5 | |
| 6 | + (void)C { } /* { dg-error "method definition not in @implementation context" } */ |
| 7 | |
| 8 | /* We have another error here to test that the compiler is still going and |
| 9 | finding errors in the rest of the code. |
| 10 | */ |
| 11 | @compatibility_alias class1 class2; /* { dg-warning "annot find class" } */ |