Re: Conflicting Namespaces on the Language Level
Re: Conflicting Namespaces on the Language Level
- Subject: Re: Conflicting Namespaces on the Language Level
- From: Nicholas Riley <email@hidden>
- Date: Sat, 14 Sep 2002 20:19:36 -0500
- Mail-followup-to: email@hidden, Cocoa-Dev <email@hidden>
Looks like you've found a bug! This is not specific to instance
variables, NSDictionary or NSArray, however (my original thought was
that something broke with class clusters). It even happens with
NSObject. Here's the minimal bit of code I've found which will cause
the warning to be produced:
#import <Foundation/Foundation.h>
@interface ClassThatShouldCompile : NSObject
@end
@implementation ClassThatShouldCompile (Category)
- (void)sample
{
[super init];
[NSObject class];
}
@end
sample.m: In function `-[ClassThatShouldCompile(Category) sample]':
sample.m:10: warning: invalid receiver type `struct _objc_class *'
sample.m:10: warning: passing arg 1 of pointer to function from incompatible pointer type
If you simply exchange the order of lines in the method, the warning
goes away.
--
=Nicholas Riley <email@hidden> | <
http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.