Last active
December 19, 2015 02:38
-
-
Save Coneko/5884356 to your computer and use it in GitHub Desktop.
[<Test 0x1002120d0> setNilValueForKey]: could not set nil as the value for the key primitive.
This file contains hidden or 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> | |
#import <ReactiveCocoa/ReactiveCocoa.h> | |
@interface Test : NSObject | |
@property (nonatomic, strong) Test *object; | |
@property (nonatomic) NSUInteger primitive; | |
@end | |
@implementation Test | |
@end | |
@interface Main : NSObject | |
- (void)main; | |
@end | |
@implementation Main | |
- (void)main { | |
Test *source = [[Test alloc] init]; | |
source.object = [[Test alloc] init]; | |
Test *destination = [[Test alloc] init]; | |
destination.object = [[Test alloc] init]; | |
[RACAble(source, object.primitive) toProperty:@keypath(destination, object.primitive) onObject:destination]; | |
source.object = nil; | |
} | |
@end | |
int main(int argc, const char * argv[]) | |
{ | |
@autoreleasepool { | |
Main *main = [[Main alloc] init]; | |
[main main]; | |
} | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment