Re: Weird build error
Re: Weird build error
- Subject: Re: Weird build error
- From: "Jonathan del Strother" <email@hidden>
- Date: Thu, 17 Apr 2008 23:59:21 +0100
On Thu, Apr 17, 2008 at 11:47 PM, Don Arnel <email@hidden> wrote:
> I've been working on a project for a few weeks now and suddenly today I get
> this error while building (see below). I was getting this same error in one
> of my real classes so after commenting out almost every bit of code and
> still seeing the error, I decided to just create a new TestClass and see if
> it would occur there. Sure enough it did. If I remove the default: case it
> compiles fine. If I remove the comments from the line that creates myArray I
> get a syntax error before '*' error.
>
> I've lost nearly all my hair on this so if someone knows what could be
> causing this I'd GREATLY appreciate the help.
>
> - Don
>
> Aside from the usual comments inserted at the top of the code and the
> untouched header as it was created, this is my entire class:
>
> #import "TestClass.h"
>
> @implementation TestClass
>
> - (void)TestFunction
> {
> switch (1) {
> case 1:
> //NSMutableArray *myArray=[[NSMutableArray alloc]
> init];
> break;
> default:
> }
> (x)(error: label at end of compound statement)
> }
>
> @end
>
Isn't the problem that you're not allowed to declare local variables
within a switch block?
_______________________________________________
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