JS backend: fix KT-5738 JS backend: result of toByte() should be in the range of bytes
#KT-5738 Fixed
This commit is contained in:
@@ -89,6 +89,14 @@
|
||||
return a < b ? -1 : a > b ? 1 : 0;
|
||||
};
|
||||
|
||||
Kotlin.toShort = function(a) {
|
||||
return (a & 0xFFFF) << 16 >> 16;
|
||||
};
|
||||
|
||||
Kotlin.toByte = function(a) {
|
||||
return (a & 0xFF) << 24 >> 24;
|
||||
};
|
||||
|
||||
Kotlin.intUpto = function (from, to) {
|
||||
return new Kotlin.NumberRange(from, to);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user