diff options
author | ovidiu <ovidiu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-05 16:44:36 +0000 |
---|---|---|
committer | ovidiu <ovidiu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-05 16:44:36 +0000 |
commit | baad6cc15a92dadb11cbf4e7a7c6a160182379c5 (patch) | |
tree | 0236eb2da1f1b3011ae099c304c37fe323b90ad4 /gcc/testsuite/objc | |
parent | 5d138b2251d153ff129bc3420029f45b5150879d (diff) | |
download | gcc-baad6cc15a92dadb11cbf4e7a7c6a160182379c5.tar.gz |
Added.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39459 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/objc')
-rw-r--r-- | gcc/testsuite/objc/execute/bycopy-1.m | 20 | ||||
-rw-r--r-- | gcc/testsuite/objc/execute/bycopy-2.m | 33 |
2 files changed, 53 insertions, 0 deletions
diff --git a/gcc/testsuite/objc/execute/bycopy-1.m b/gcc/testsuite/objc/execute/bycopy-1.m new file mode 100644 index 00000000000..83f4b270b8f --- /dev/null +++ b/gcc/testsuite/objc/execute/bycopy-1.m @@ -0,0 +1,20 @@ +/* + * Contributed by Nicola Pero <nicola@brainstorm.co.uk> + * Fri Feb 2 11:48:01 GMT 2001 + */ + +#include <objc/objc.h> +#include <objc/Protocol.h> + +@protocol MyProtocol +- (bycopy id) bycopyMethod; +@end + +int main (void) +{ + [nil bycopyMethod]; + + exit (0); +} + + diff --git a/gcc/testsuite/objc/execute/bycopy-2.m b/gcc/testsuite/objc/execute/bycopy-2.m new file mode 100644 index 00000000000..dce028152a9 --- /dev/null +++ b/gcc/testsuite/objc/execute/bycopy-2.m @@ -0,0 +1,33 @@ +/* + * Contributed by Nicola Pero <nicola@brainstorm.co.uk> + * Fri Feb 2 11:48:01 GMT 2001 + */ + +#include <objc/objc.h> +#include <objc/Object.h> +#include <objc/Protocol.h> + +@protocol MyProtocol ++ (bycopy id<MyProtocol>) bycopyMethod; +@end + +@interface MyObject : Object <MyProtocol> +@end + +@implementation MyObject ++ (bycopy id<MyProtocol>) bycopyMethod +{ + return [MyObject alloc]; +} +@end + +int main (void) +{ + MyObject *object; + + object = [MyObject bycopyMethod]; + + exit (0); +} + + |