aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/objc.dg/class-extension-4.m
blob: 692a0fcbd0a828f8491793b9e73a07c108d91935 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010.  */
/* { dg-do compile } */

/* This test tests you can not declare a class extension after the class @implementation.  */

#include <objc/objc.h>

@interface MyObject
{
  Class isa;
}
@end

@implementation MyObject
@end

@interface MyObject ()
- (void) test; /* { dg-error "class extension for class .MyObject. declared after its ..implementation." } */
@end