Why NSNumber of 0 cannot be converted to correct NSInteger/NSUInteger value?
NSUInteger a = [@0 unsignedIntegerValue]; // a become nil
Why is a
in the above line of code nil. Shouldn't it be equal to 0
?
In the console:
(lldb) po [@0 intValue]
0
(lldb) po [@0 integerValue]
<nil>
(lldb) po [@0 unsignedIntegerValue]
<nil>
Update:
(lldb) p [@0 unsignedIntegerValue]
(NSUInteger) $0 = 0
Use p not po