• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Block error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Block error
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Automatic create a IPA file with the date in the name
  • Next by Date: Re: Block error
  • Previous by thread: Automatic create a IPA file with the date in the name
  • Next by thread: Re: Block error
  • Index(es):
    • Date
    • Thread