JS: Provide MIN_VALUE and MAX_VALUE member constants for Int, Long, Short and Byte companion objects.

JVM: Make MIN_VALUE and MAX_VALUE not an extension but member constant properties of Int, Long, Short and Byte companion objects.
This commit is contained in:
Ilya Gorbunov
2015-05-14 19:19:17 +03:00
parent c4b881c458
commit f18b9caa8d
10 changed files with 143 additions and 52 deletions
+4 -4
View File
@@ -23,7 +23,7 @@ package kotlin
* On the JVM, non-nullable values of this type are represented as values of the primitive type `byte`.
*/
public class Byte private () : Number, Comparable<Byte> {
companion object {}
companion object : IntegerConstants<Byte> {}
/**
* Compares this value with the specified value for order.
@@ -326,7 +326,7 @@ public class Char private () : Comparable<Char> {
* On the JVM, non-nullable values of this type are represented as values of the primitive type `short`.
*/
public class Short private () : Number, Comparable<Short> {
companion object {}
companion object : IntegerConstants<Short> {}
/**
* Compares this value with the specified value for order.
@@ -484,7 +484,7 @@ public class Short private () : Number, Comparable<Short> {
* On the JVM, non-nullable values of this type are represented as values of the primitive type `int`.
*/
public class Int private () : Number, Comparable<Int> {
companion object {}
companion object : IntegerConstants<Int> {}
/**
* Compares this value with the specified value for order.
@@ -657,7 +657,7 @@ public class Int private () : Number, Comparable<Int> {
* On the JVM, non-nullable values of this type are represented as values of the primitive type `long`.
*/
public class Long private () : Number, Comparable<Long> {
companion object {}
companion object : IntegerConstants<Long> {}
/**
* Compares this value with the specified value for order.