hasDomain(unsigned8,V1),
hasDomain(unsigned8,V2),V1=0xff,V2=~~V1,% --> The value 4294967040 is out of the range [ 0 .. 255 ] for the domain 'core::unsigned8'V3=V2+1,
stdio::writef("%x\n",V3),
I think the answer is (Thomas may correct me): The Language Reference says that the operators for bitwise operations are declared (only) on unsigned, unsigned64, and unsignedNative arguments.
When an unsigned8 argument is supplied to the NOT operator it will be converted to the 'best-fitting' domain, thus it will be converted to unsigned. The result of ~~V1, where V1 is of domain unsigned and has value 0, exceeds of course the limits of unsigned8.
To make NOT work with unsigned8 and unsigned16 the upper three resp. two bytes of the result must be zeroed. For example:
I had stepped through to see the domain change and the FFFFFF in the upper bytes. Thanks for the clarification on the documentation--I had completely overlooked that line. I hope in the future unsigned8 will be supported as well.