NSDecimalNumber is a subclass of NSNumber, and from what I can say, it implements all NSNumber methods as expected for an NSNumber instance.
Given this, is it okay to give NSDecimalNumbers to any code expecting an NSNumber?
The only possible problem could be code that verifies that the argument is an instance of NSNumber, but since NSNumber is a class cluster, such code should verify that the instance is a subclass of NSNumber, and that the NSDecimalNumber instances must pass the same tests.
source
share