Re: Receiver type for instance message is a forward declaration
Re: Receiver type for instance message is a forward declaration
- Subject: Re: Receiver type for instance message is a forward declaration
- From: Jens Alfke <email@hidden>
- Date: Fri, 06 May 2016 13:47:14 -0700
> On May 6, 2016, at 1:42 PM, Carl Hoefs <email@hidden> wrote:
>
> I would have thought that this earlier line would have been flagged if RAOperation.h hadn't been included:
>
> RAOperation *op = [self _popOperation: listPtr];
There must be a forward declaration (“@class RAOperation”) somewhere above, possibly in your class’s header. After a forward declaration, you can refer to the class and declare references to instances. But since the compiler has no idea what the class’s interface is, or even what it’s superclass is, it will complain if you try to message a reference.
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden