You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
346 B
Objective-C
27 lines
346 B
Objective-C
#include "Test.h"
|
|
#include "../objc/runtime.h"
|
|
|
|
#pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation"
|
|
@interface Foo : Test
|
|
+ (int)replaced;
|
|
@end
|
|
@implementation Foo
|
|
+ (int)replaced
|
|
{
|
|
return 1;
|
|
}
|
|
@end
|
|
|
|
@implementation Foo (bar)
|
|
+ (int)replaced
|
|
{
|
|
return 2;
|
|
}
|
|
@end
|
|
|
|
int main (void)
|
|
{
|
|
assert([Foo replaced] == 2);
|
|
return 0;
|
|
}
|