We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e23f5fb commit 8c68fa5Copy full SHA for 8c68fa5
Test/FastPathAlloc.m
@@ -91,6 +91,11 @@ + (instancetype)alloc
91
}
92
@end
93
94
+Class getClassNamed(char *name)
95
+{
96
+ return nil;
97
+}
98
+
99
int main(void)
100
{
101
called = NO;
@@ -124,6 +129,11 @@ int main(void)
124
129
125
130
[[NoInit2 alloc] init];
126
131
assert(!called);
132
133
+ // Look up a non-existing class to test if fast-path
134
+ // implementations can handle receivers that are nil
135
+ [getClassNamed("flibble") alloc];
136
+ [[getClassNamed("flibble") alloc] init];
127
137
128
138
139
#endif
0 commit comments