Re: Initing sublacss with superclass method

Riccardo Mottola <[email protected]> Wed, 23 Jul 2025 10:47:42 +0200
Newsgroups gmane.comp.lib.gnustep.devel
Message-ID <[email protected]>
Hi,

Riccardo Mottola wrote:
>     if ([cs isKindOfClass:[NSCharacterSet class]])
>       NSLog(@"is NSCharacterSet");
>     if ([cs isKindOfClass:[NSMutableCharacterSet class]])
>       NSLog(@"is NSMutableCharacterSet"); 

if this is a safe test - and it ought to be - then it passes also on 
venerable 10.4. So actually it is there that the Xcode doc. lies, since 
it returns a NSMutableCharacterSet.

Now, I had a look at our code and the issue was just the interface, the 
code was there - this is why the program did not actually crash. I 
opened PR 521 in that regard and for discussions, since there are other 
methods that may be affected, although their implementation is done 
through mutableCopy

Riccardo