1 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010. */
2 /* { dg-do compile } */
4 /* Test the 'dot syntax' without a declarated property. This tests
5 syntax errors in the case where the object is a Class. */
10 #include <objc/runtime.h>
12 @interface MyRootClass
21 @implementation MyRootClass
22 + (id) initialize { return self; }
23 + (id) alloc { return class_createInstance (self, 0); }
24 - (id) init { return self; }
29 MyRootClass.invalid = 40; /* { dg-error "could not find setter.getter" } */
30 if (MyRootClass.invalid != 40) /* { dg-error "could not find setter.getter" } */
33 MyRootClass.; /* { dg-error "expected identifier" } */
34 if (MyRootClass.) /* { dg-error "expected identifier" } */
37 MyRootClass.int; /* { dg-error "expected identifier" } */
38 if (MyRootClass.int) /* { dg-error "expected identifier" } */