We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02f9c95 commit 17e1a13Copy full SHA for 17e1a13
src/vm/js/nqp-runtime/reprs.js
@@ -687,11 +687,11 @@ class P6int extends REPR {
687
688
asRefType() {
689
if (this.bits === 8) {
690
- return ref.types.int8;
+ return this.isUnsigned ? ref.types.uint8 : ref.types.int8;
691
} else if (this.bits === 16) {
692
- return ref.types.int16;
+ return this.isUnsigned ? ref.types.uint16 : ref.types.int16;
693
} else if (this.bits === 32) {
694
- return ref.types.int32;
+ return this.isUnsigned ? ref.types.uint32 : ref.types.int32;
695
} else {
696
throw new NQPException(`Unsupported use in lowlevel contex, bits: ${this.bits}`);
697
}
0 commit comments