| 1 |
/* Contributed by Nicola Pero <[email protected]>, December 2010. */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-additional-options "-Wno-objc-root-class" } */ |
| 4 |
|
| 5 |
/* This test tests you can not declare a class extension after the class @implementation. */ |
| 6 |
|
| 7 |
#include <objc/objc.h> |
| 8 |
|
| 9 |
@interface MyObject |
| 10 |
{ |
| 11 |
Class isa; |
| 12 |
} |
| 13 |
@end |
| 14 |
|
| 15 |
@implementation MyObject |
| 16 |
@end |
| 17 |
|
| 18 |
@interface MyObject () |
| 19 |
- (void) test; /* { dg-error "class extension for class .MyObject. declared after its ..implementation." } */ |
| 20 |
@end |