aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ARCMT/init.m2
-rw-r--r--test/ARCMT/init.m.result6
2 files changed, 6 insertions, 2 deletions
diff --git a/test/ARCMT/init.m b/test/ARCMT/init.m
index 36e5148476..9dbb1f82b8 100644
--- a/test/ARCMT/init.m
+++ b/test/ARCMT/init.m
@@ -3,6 +3,8 @@
// RUN: diff %t %s.result
// DISABLE: mingw32
+#define nil (void *)0
+
@interface NSObject
-init;
@end
diff --git a/test/ARCMT/init.m.result b/test/ARCMT/init.m.result
index 9f568d83ed..d7f730083a 100644
--- a/test/ARCMT/init.m.result
+++ b/test/ARCMT/init.m.result
@@ -3,6 +3,8 @@
// RUN: diff %t %s.result
// DISABLE: mingw32
+#define nil (void *)0
+
@interface NSObject
-init;
@end
@@ -16,7 +18,7 @@
@implementation A
-(id) init {
- self = [self init];
+ if (!(self = [self init])) return nil;
id a;
[a init];
a = [[A alloc] init];
@@ -25,7 +27,7 @@
}
-(id) init2 {
- self = [super init];
+ if (!(self = [super init])) return nil;
return self;
}