1 /* Ensure there are no bizarre difficulties with accessing the 'isa' field of objects. */
2 /* { dg-do compile { target *-*-darwin* } } */
4 #include <objc/Object.h>
6 @interface Object (Test)
7 - (Class) test1: (id)object;
10 @interface Derived: Object
11 - (Class) test2: (id)object;
14 @implementation Object (Test)
16 Class test1(id object) {
17 Class cls = object->isa;
20 - (Class) test1: (id)object {
21 Class cls = object->isa;
27 @implementation Derived
29 Class test2(id object) {
30 Class cls = object->isa;
33 - (Class) test2: (id)object {
34 Class cls = object->isa;
40 Class test3(id object) {
41 Class cls = object->isa;