[stdlib-js-ir] Add equals, hashCode, toString to some builtins

Namely:
* Throwable;
* primitive numbers except Long (which implemented in Kotlin).
This commit is contained in:
Zalim Bashorov
2019-11-28 18:51:41 +03:00
parent 97e86fb2ce
commit adfb296e45
2 changed files with 32 additions and 7 deletions
@@ -218,6 +218,10 @@ public class Byte private constructor() : Number(), Comparable<Byte> {
* The resulting `Double` value represents the same numerical value as this `Byte`.
*/
public override fun toDouble(): Double
public override fun equals(other: Any?): Boolean
public override fun hashCode(): Int
public override fun toString(): String
}
/**
@@ -428,6 +432,10 @@ public class Short private constructor() : Number(), Comparable<Short> {
* The resulting `Double` value represents the same numerical value as this `Short`.
*/
public override fun toDouble(): Double
public override fun equals(other: Any?): Boolean
public override fun hashCode(): Int
public override fun toString(): String
}
/**
@@ -657,6 +665,10 @@ public class Int private constructor() : Number(), Comparable<Int> {
* The resulting `Double` value represents the same numerical value as this `Int`.
*/
public override fun toDouble(): Double
public override fun equals(other: Any?): Boolean
public override fun hashCode(): Int
public override fun toString(): String
}
/**
@@ -863,6 +875,10 @@ public class Float private constructor() : Number(), Comparable<Float> {
* The resulting `Double` value represents the same numerical value as this `Float`.
*/
public override fun toDouble(): Double
public override fun equals(other: Any?): Boolean
public override fun hashCode(): Int
public override fun toString(): String
}
/**
@@ -1071,5 +1087,9 @@ public class Double private constructor() : Number(), Comparable<Double> {
public override fun toFloat(): Float
/** Returns this value. */
public override fun toDouble(): Double
public override fun equals(other: Any?): Boolean
public override fun hashCode(): Int
public override fun toString(): String
}