Calling NSNumber class methods on NSDecimalNumber
Calling NSNumber class methods on NSDecimalNumber
- Subject: Calling NSNumber class methods on NSDecimalNumber
- From: Dave Camp <email@hidden>
- Date: Tue, 22 Apr 2008 08:19:34 -0700
After some testing, it appears that calling NSDecimalNumber with class
methods of it's NSNumber parent class return the expected
NSDecimalNumber object. For example, [[NSDecimalNumber
numberWithDouble:1.1] isKindOfClass:[NSDecimalNumber class]] returns
YES (and the resulting object has the correct value)
The problem is that I get the warning "initialization from distinct
Objective-C type" when I do this, because the NSNumber class methods
return a specific type instead of id.
My question is: is this a bug in the NSNumber headers that I should
report, or is this unsafe code and I shouldn't be doing this?
Thanks,
Dave
_______________________________________________
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