diff options
author | no-author <no-author@gcc.gnu.org> | 2005-07-22 07:31:32 +0000 |
---|---|---|
committer | no-author <no-author@gcc.gnu.org> | 2005-07-22 07:31:32 +0000 |
commit | ea85b3c5c3e92a70dabb440b249f7c97cdb3045f (patch) | |
tree | 2d00554ce3107c7986bcf8019547e9fa8d7708b7 /gcc/testsuite/objc.dg/isa-field-1.m | |
parent | 06dbf9039672be06678a949dc384273e5a4ea8c1 (diff) |
This commit was manufactured by cvs2svn to create branch 'cfo-branch'.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/cfo-branch@102274 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/objc.dg/isa-field-1.m')
-rw-r--r-- | gcc/testsuite/objc.dg/isa-field-1.m | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/isa-field-1.m b/gcc/testsuite/objc.dg/isa-field-1.m new file mode 100644 index 00000000000..6398b608d82 --- /dev/null +++ b/gcc/testsuite/objc.dg/isa-field-1.m @@ -0,0 +1,43 @@ +/* Ensure there are no bizarre difficulties with accessing the 'isa' field of objects. */ +/* { dg-do compile { target *-*-darwin* } } */ + +#include <objc/Object.h> + +@interface Object (Test) +- (Class) test1: (id)object; +@end + +@interface Derived: Object +- (Class) test2: (id)object; +@end + +@implementation Object (Test) + +Class test1(id object) { + Class cls = object->isa; + return cls; +} +- (Class) test1: (id)object { + Class cls = object->isa; + return cls; +} + +@end + +@implementation Derived + +Class test2(id object) { + Class cls = object->isa; + return cls; +} +- (Class) test2: (id)object { + Class cls = object->isa; + return cls; +} + +@end + +Class test3(id object) { + Class cls = object->isa; + return cls; +} |