Block error
Block error
- Subject: Block error
- From: Rick Mann <email@hidden>
- Date: Fri, 15 Jul 2011 14:42:12 -0700
I'm getting an error from llvmgcc-4.2:
Test.m:38:0 Test.m:38: error: incompatible type returning 'void *', expected 'struct Foo *'
I can work around it by not returning nil, but rather by returning a nil class reference of type other than id.
@interface Foo : NSObject
{
}
@end
@implementation Foo
@end
void
bar()
{
(id) ^(id inParam1)
{
if ([inParam1 isEqual: @"baz"])
{
Foo* foo = [[Foo alloc] init];
return foo;
}
return nil; // Error here
};
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden