So I guess the compiler treats the *first* declaration of a
method
name-and-signature that it encounters as the real one.
Now, that's okay ...
Not really. Without the warning flag it means that the type
checking you would hope to get from the compiler is subverted.
In your example it
On or about 4/26/10 1:22 PM, thus spake Greg Parker gpar...@apple.com:
The compiler warns more aggressively for mismatches that do affect the call
site's code. Those are more likely to be actual bugs, rather than correct but
loosely-typed code. For example, if you change your example's
Hi Matt
I see now, however, *why* the compiler is silent: it's because it weren't,
it would be too chatty. I turned on -Wselector and got 114 warnings... :)
You too eh? Wow, was that a surprise - my tutorial project gave me 3679!!!
Joanna
--
Joanna Carter
Carter Consulting
I am so confused about something in Objective-C that I thought was perfectly
clear and that I understood perfectly well. Please give me some kind of dope
slap to get my brain back on track.
The Objective-C docs say:
Methods in different classes that have the same selector (the same name)
must
On Apr 26, 2010, at 1:01 PM, Matt Neuburg wrote:
Methods in different classes that have the same selector (the same
name)
must also share the same return and argument types. This constraint is
imposed by the compiler...
It's more like should, and the reason is because of the ambiguity of
On Apr 26, 2010, at 1:01 PM, Matt Neuburg wrote:
I am so confused about something in Objective-C that I thought was perfectly
clear and that I understood perfectly well. Please give me some kind of dope
slap to get my brain back on track.
The Objective-C docs say:
Methods in different
On or about 4/26/10 1:22 PM, thus spake Greg Parker gpar...@apple.com:
On Apr 26, 2010, at 1:01 PM, Matt Neuburg wrote:
Here's my test:
MyClass:
- (void) tryme: (NSString*) s;
MyClass2:
- (void) tryme: (NSArray*) s;
MyClass* thing = [[MyClass alloc] init];
NSString* s = @Howdy;