-
-
Save rbsgn/f95b0476c18c4dc57a0570ca2de4e0a4 to your computer and use it in GitHub Desktop.
Is this an undefined behaviour in Objective-C?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface Foo : NSObject | |
@end | |
@interface Foo (UndefinedBehaviour) | |
- (void)foo:(id)foo bar:(id)bar; | |
@end | |
@interface Bar: Foo | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "Foo.h" | |
@implementation Foo | |
@end | |
@implementation Foo (UndefinedBehaviour) | |
- (void)foo:(id)foo bar:(id)bar | |
{ | |
NSLog(@"@implementation of Foo (UndefinedBehaviour)"); | |
} | |
@end | |
@implementation Bar | |
- (void)foo:(id)foo bar:(id)bar | |
{ | |
NSLog(@"@implementation Bar"); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment