diff --git a/core/builtins/native/kotlin/Enum.kt b/core/builtins/native/kotlin/Enum.kt index 7fa7cdd9e5a..5d290eacfd3 100644 --- a/core/builtins/native/kotlin/Enum.kt +++ b/core/builtins/native/kotlin/Enum.kt @@ -22,7 +22,7 @@ package kotlin * information on enum classes. */ public abstract class Enum>(name: String, ordinal: Int): Comparable { - class object {} + default object {} /** * Returns the name of this enum constant, exactly as declared in its enum declaration. diff --git a/core/builtins/native/kotlin/Numbers.kt b/core/builtins/native/kotlin/Numbers.kt index 9b8a92bb965..5a7dfa8cc24 100644 --- a/core/builtins/native/kotlin/Numbers.kt +++ b/core/builtins/native/kotlin/Numbers.kt @@ -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 { - class object {} + default object {} public override fun compareTo(other: Byte): Int public fun compareTo(other: Char): Int @@ -100,7 +100,7 @@ public class Byte private () : Number, Comparable { * On the JVM, non-nullable values of this type are represented as values of the primitive type `short`. */ public class Short private () : Number, Comparable { - class object {} + default object {} public fun compareTo(other: Byte): Int public fun compareTo(other: Char): Int @@ -177,7 +177,7 @@ public class Short private () : Number, Comparable { * On the JVM, non-nullable values of this type are represented as values of the primitive type `int`. */ public class Int private () : Number, Comparable { - class object {} + default object {} public fun compareTo(other: Byte): Int public fun compareTo(other: Char): Int @@ -262,7 +262,7 @@ public class Int private () : Number, Comparable { * On the JVM, non-nullable values of this type are represented as values of the primitive type `long`. */ public class Long private () : Number, Comparable { - class object {} + default object {} public fun compareTo(other: Byte): Int public fun compareTo(other: Char): Int @@ -347,7 +347,7 @@ public class Long private () : Number, Comparable { * On the JVM, non-nullable values of this type are represented as values of the primitive type `float`. */ public class Float private () : Number, Comparable { - class object : FloatingPointConstants {} + default object : FloatingPointConstants {} public fun compareTo(other: Byte): Int public fun compareTo(other: Char): Int @@ -424,7 +424,7 @@ public class Float private () : Number, Comparable { * On the JVM, non-nullable values of this type are represented as values of the primitive type `double`. */ public class Double private () : Number, Comparable { - class object : FloatingPointConstants {} + default object : FloatingPointConstants {} public fun compareTo(other: Byte): Int public fun compareTo(other: Char): Int diff --git a/core/builtins/native/kotlin/String.kt b/core/builtins/native/kotlin/String.kt index 08fe3c2c6db..c5309bffe4e 100644 --- a/core/builtins/native/kotlin/String.kt +++ b/core/builtins/native/kotlin/String.kt @@ -21,7 +21,7 @@ package kotlin * implemented as instances of this class. */ public class String : Comparable, CharSequence { - class object {} + default object {} /** * Returns a string obtained by concatenating this string with the string representation of the given [other] object. diff --git a/core/builtins/src/kotlin/Ranges.kt b/core/builtins/src/kotlin/Ranges.kt index 227e856f5c9..2d0506ba49d 100644 --- a/core/builtins/src/kotlin/Ranges.kt +++ b/core/builtins/src/kotlin/Ranges.kt @@ -38,7 +38,7 @@ public class ByteRange(override val start: Byte, override val end: Byte) : Range override fun hashCode(): Int = if (isEmpty()) -1 else (31 * start.toInt() + end) - class object { + default object { /** An empty range of values of type Byte. */ public val EMPTY: ByteRange = ByteRange(1, 0) } @@ -64,7 +64,7 @@ public class CharRange(override val start: Char, override val end: Char) : Range override fun hashCode(): Int = if (isEmpty()) -1 else (31 * start.toInt() + end) - class object { + default object { /** An empty range of values of type Char. */ public val EMPTY: CharRange = CharRange(1.toChar(), 0.toChar()) } @@ -90,7 +90,7 @@ public class ShortRange(override val start: Short, override val end: Short) : Ra override fun hashCode(): Int = if (isEmpty()) -1 else (31 * start.toInt() + end) - class object { + default object { /** An empty range of values of type Short. */ public val EMPTY: ShortRange = ShortRange(1, 0) } @@ -116,7 +116,7 @@ public class IntRange(override val start: Int, override val end: Int) : Range {") - out.print(" class object") + out.print(" default object") if (kind == PrimitiveType.FLOAT || kind == PrimitiveType.DOUBLE) { out.print(" : FloatingPointConstants<$className>") } diff --git a/generators/src/org/jetbrains/kotlin/generators/builtins/ranges.kt b/generators/src/org/jetbrains/kotlin/generators/builtins/ranges.kt index 27b4f14a5df..31a98247649 100644 --- a/generators/src/org/jetbrains/kotlin/generators/builtins/ranges.kt +++ b/generators/src/org/jetbrains/kotlin/generators/builtins/ranges.kt @@ -82,7 +82,7 @@ public class $range(override val start: $t, override val end: $t) : Range<$t>, P override fun hashCode(): Int $hashCode - class object { + default object { /** An empty range of values of type $t. */ public val EMPTY: $range = $range($emptyBounds) }