[Adium-devl] [Adium-svn] rev 23724 - trunk/Plugins/Facebook Service

Graham Booker gbooker at cod3r.com
Thu May 29 19:39:55 UTC 2008


On May 29, 2008, at 1:33 PM, Peter Hosey wrote:

> On May 29, 2008, at 09:19:58, Graham Booker wrote:
>> It is an NSConstantString *, iirc.
>
> That's its class, but that's not the question. The question is what
> the type of the expression in the compiler is, as it considers it for
> type mismatches (e.g., assigning an NSFoo *to an NSBar *variable).
>
> If the type of the expression is NSString *or any variant thereof, the
> compiler should have warned us when we tried to pass that to a method
> argument that was clearly labeled an NSURL *. The fact that it didn't
> implies that the expression was of type id—but I can't imagine why,
> considering that the compiler should always know the type of one of
> its own literals.

Sorry, I missed that; I noticed the @"1" but not the url on the next  
line.

I think it treats it like an id, because the following don't give  
warnings:
	[NSURLRequest requestWithURL:@"test"];

Also, this gives warnings:
	[@"something" setObject:@"object" forKey:@"key"];
but, they are stating that there are multiple setObject:forKey: and it  
doesn't know which one I intend; indicative of an an id.

I agree, the compile needs to know what this is, but it doesn't seem  
to.  Maybe someone was lazy in the compiler definitions?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3632 bytes
Desc: not available
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20080529/abb61d27/attachment.p7s>


More information about the devel mailing list