Replace 'class object' with 'default object' in renderers and test data

Includes changes to decompiled text
Old syntax is used in builtins and project code for now
This commit is contained in:
Pavel V. Talanov
2015-03-06 12:51:59 +03:00
parent 28ed30bcb3
commit 59f192ef90
794 changed files with 1120 additions and 1109 deletions
@@ -237,9 +237,6 @@ private object DebugTextBuildingVisitor : JetVisitor<String, Unit>() {
return buildText { return buildText {
append("STUB: ") append("STUB: ")
appendInn(declaration.getModifierList(), suffix = " ") appendInn(declaration.getModifierList(), suffix = " ")
if (declaration.isDefault()) {
append("class ")
}
append("object ") append("object ")
appendInn(declaration.getNameAsName()) appendInn(declaration.getNameAsName())
appendInn(declaration.getDelegationSpecifierList(), prefix = " : ") appendInn(declaration.getDelegationSpecifierList(), prefix = " : ")
@@ -273,9 +270,6 @@ private object DebugTextBuildingVisitor : JetVisitor<String, Unit>() {
override fun visitTypeConstraint(constraint: JetTypeConstraint, data: Unit?): String? { override fun visitTypeConstraint(constraint: JetTypeConstraint, data: Unit?): String? {
return buildText { return buildText {
if (constraint.isDefaultObjectConstraint()) {
append("class object ")
}
appendInn(constraint.getSubjectTypeParameterName()) appendInn(constraint.getSubjectTypeParameterName())
appendInn(constraint.getBoundTypeReference(), prefix = " : ") appendInn(constraint.getBoundTypeReference(), prefix = " : ")
} }
@@ -123,7 +123,7 @@ public class OverloadResolver {
if (jetClass instanceof JetObjectDeclaration) { if (jetClass instanceof JetObjectDeclaration) {
// must be default object // must be default object
name = classDescriptor.getContainingDeclaration().getName().asString(); name = classDescriptor.getContainingDeclaration().getName().asString();
return "class object " + name; return "default object " + name;
} }
// safe // safe
return "<unknown>"; return "<unknown>";
@@ -1,6 +1,6 @@
package test package test
class WithClassObject { class WithClassObject {
class object { default object {
} }
} }
@@ -3,7 +3,7 @@ package test
import kotlin.platform.platformStatic import kotlin.platform.platformStatic
class PlatformStaticClass { class PlatformStaticClass {
class object { default object {
platformStatic platformStatic
fun inClassObject<T>() {} fun inClassObject<T>() {}
} }
@@ -1,7 +1,7 @@
// ClassObjectField // ClassObjectField
class ClassObjectField { class ClassObjectField {
class object { default object {
val x: String? = "" val x: String? = ""
private val y: String? = "" private val y: String? = ""
} }
@@ -1,7 +1,7 @@
// TraitClassObjectField // TraitClassObjectField
trait TraitClassObjectField { trait TraitClassObjectField {
class object { default object {
val x: String? = "" val x: String? = ""
private val y: String? = "" private val y: String? = ""
} }
+15 -15
View File
@@ -109,7 +109,7 @@ public final class Byte : kotlin.Number, kotlin.Comparable<kotlin.Byte> {
public open override /*1*/ fun toLong(): kotlin.Long public open override /*1*/ fun toLong(): kotlin.Long
public open override /*1*/ fun toShort(): kotlin.Short public open override /*1*/ fun toShort(): kotlin.Short
public class object Default { public default object Default {
/*primary*/ private constructor Default() /*primary*/ private constructor Default()
} }
} }
@@ -171,7 +171,7 @@ public final class ByteRange : kotlin.Range<kotlin.Byte>, kotlin.Progression<kot
public open override /*1*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ fun isEmpty(): kotlin.Boolean
public open override /*1*/ fun iterator(): kotlin.ByteIterator public open override /*1*/ fun iterator(): kotlin.ByteIterator
public class object Default { public default object Default {
/*primary*/ private constructor Default() /*primary*/ private constructor Default()
public final val EMPTY: kotlin.ByteRange public final val EMPTY: kotlin.ByteRange
public final fun <get-EMPTY>(): kotlin.ByteRange public final fun <get-EMPTY>(): kotlin.ByteRange
@@ -289,7 +289,7 @@ public final class CharRange : kotlin.Range<kotlin.Char>, kotlin.Progression<kot
public open override /*1*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ fun isEmpty(): kotlin.Boolean
public open override /*1*/ fun iterator(): kotlin.CharIterator public open override /*1*/ fun iterator(): kotlin.CharIterator
public class object Default { public default object Default {
/*primary*/ private constructor Default() /*primary*/ private constructor Default()
public final val EMPTY: kotlin.CharRange public final val EMPTY: kotlin.CharRange
public final fun <get-EMPTY>(): kotlin.CharRange public final fun <get-EMPTY>(): kotlin.CharRange
@@ -380,7 +380,7 @@ public final class Double : kotlin.Number, kotlin.Comparable<kotlin.Double> {
public open override /*1*/ fun toLong(): kotlin.Long public open override /*1*/ fun toLong(): kotlin.Long
public open override /*1*/ fun toShort(): kotlin.Short public open override /*1*/ fun toShort(): kotlin.Short
public class object Default : kotlin.FloatingPointConstants<kotlin.Double> { public default object Default : kotlin.FloatingPointConstants<kotlin.Double> {
/*primary*/ private constructor Default() /*primary*/ private constructor Default()
public abstract override /*1*/ /*fake_override*/ val NEGATIVE_INFINITY: kotlin.Double public abstract override /*1*/ /*fake_override*/ val NEGATIVE_INFINITY: kotlin.Double
public abstract override /*1*/ /*fake_override*/ fun <get-NEGATIVE_INFINITY>(): kotlin.Double public abstract override /*1*/ /*fake_override*/ fun <get-NEGATIVE_INFINITY>(): kotlin.Double
@@ -445,7 +445,7 @@ public final class DoubleRange : kotlin.Range<kotlin.Double>, kotlin.Progression
public open override /*1*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ fun isEmpty(): kotlin.Boolean
public open override /*1*/ fun iterator(): kotlin.DoubleIterator public open override /*1*/ fun iterator(): kotlin.DoubleIterator
public class object Default { public default object Default {
/*primary*/ private constructor Default() /*primary*/ private constructor Default()
public final val EMPTY: kotlin.DoubleRange public final val EMPTY: kotlin.DoubleRange
public final fun <get-EMPTY>(): kotlin.DoubleRange public final fun <get-EMPTY>(): kotlin.DoubleRange
@@ -458,7 +458,7 @@ public abstract class Enum</*0*/ E : kotlin.Enum<E>> : kotlin.Comparable<E> {
public final fun name(): kotlin.String public final fun name(): kotlin.String
public final fun ordinal(): kotlin.Int public final fun ordinal(): kotlin.Int
public class object Default { public default object Default {
/*primary*/ private constructor Default() /*primary*/ private constructor Default()
} }
} }
@@ -618,7 +618,7 @@ public final class Float : kotlin.Number, kotlin.Comparable<kotlin.Float> {
public open override /*1*/ fun toLong(): kotlin.Long public open override /*1*/ fun toLong(): kotlin.Long
public open override /*1*/ fun toShort(): kotlin.Short public open override /*1*/ fun toShort(): kotlin.Short
public class object Default : kotlin.FloatingPointConstants<kotlin.Float> { public default object Default : kotlin.FloatingPointConstants<kotlin.Float> {
/*primary*/ private constructor Default() /*primary*/ private constructor Default()
public abstract override /*1*/ /*fake_override*/ val NEGATIVE_INFINITY: kotlin.Float public abstract override /*1*/ /*fake_override*/ val NEGATIVE_INFINITY: kotlin.Float
public abstract override /*1*/ /*fake_override*/ fun <get-NEGATIVE_INFINITY>(): kotlin.Float public abstract override /*1*/ /*fake_override*/ fun <get-NEGATIVE_INFINITY>(): kotlin.Float
@@ -683,7 +683,7 @@ public final class FloatRange : kotlin.Range<kotlin.Float>, kotlin.Progression<k
public open override /*1*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ fun isEmpty(): kotlin.Boolean
public open override /*1*/ fun iterator(): kotlin.FloatIterator public open override /*1*/ fun iterator(): kotlin.FloatIterator
public class object Default { public default object Default {
/*primary*/ private constructor Default() /*primary*/ private constructor Default()
public final val EMPTY: kotlin.FloatRange public final val EMPTY: kotlin.FloatRange
public final fun <get-EMPTY>(): kotlin.FloatRange public final fun <get-EMPTY>(): kotlin.FloatRange
@@ -911,7 +911,7 @@ public final class Int : kotlin.Number, kotlin.Comparable<kotlin.Int> {
public final fun ushr(/*0*/ bits: kotlin.Int): kotlin.Int public final fun ushr(/*0*/ bits: kotlin.Int): kotlin.Int
public final fun xor(/*0*/ other: kotlin.Int): kotlin.Int public final fun xor(/*0*/ other: kotlin.Int): kotlin.Int
public class object Default { public default object Default {
/*primary*/ private constructor Default() /*primary*/ private constructor Default()
} }
} }
@@ -973,7 +973,7 @@ public final class IntRange : kotlin.Range<kotlin.Int>, kotlin.Progression<kotli
public open override /*1*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ fun isEmpty(): kotlin.Boolean
public open override /*1*/ fun iterator(): kotlin.IntIterator public open override /*1*/ fun iterator(): kotlin.IntIterator
public class object Default { public default object Default {
/*primary*/ private constructor Default() /*primary*/ private constructor Default()
public final val EMPTY: kotlin.IntRange public final val EMPTY: kotlin.IntRange
public final fun <get-EMPTY>(): kotlin.IntRange public final fun <get-EMPTY>(): kotlin.IntRange
@@ -1082,7 +1082,7 @@ public final class Long : kotlin.Number, kotlin.Comparable<kotlin.Long> {
public final fun ushr(/*0*/ bits: kotlin.Int): kotlin.Long public final fun ushr(/*0*/ bits: kotlin.Int): kotlin.Long
public final fun xor(/*0*/ other: kotlin.Long): kotlin.Long public final fun xor(/*0*/ other: kotlin.Long): kotlin.Long
public class object Default { public default object Default {
/*primary*/ private constructor Default() /*primary*/ private constructor Default()
} }
} }
@@ -1144,7 +1144,7 @@ public final class LongRange : kotlin.Range<kotlin.Long>, kotlin.Progression<kot
public open override /*1*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ fun isEmpty(): kotlin.Boolean
public open override /*1*/ fun iterator(): kotlin.LongIterator public open override /*1*/ fun iterator(): kotlin.LongIterator
public class object Default { public default object Default {
/*primary*/ private constructor Default() /*primary*/ private constructor Default()
public final val EMPTY: kotlin.LongRange public final val EMPTY: kotlin.LongRange
public final fun <get-EMPTY>(): kotlin.LongRange public final fun <get-EMPTY>(): kotlin.LongRange
@@ -1378,7 +1378,7 @@ public final class Short : kotlin.Number, kotlin.Comparable<kotlin.Short> {
public open override /*1*/ fun toLong(): kotlin.Long public open override /*1*/ fun toLong(): kotlin.Long
public open override /*1*/ fun toShort(): kotlin.Short public open override /*1*/ fun toShort(): kotlin.Short
public class object Default { public default object Default {
/*primary*/ private constructor Default() /*primary*/ private constructor Default()
} }
} }
@@ -1440,7 +1440,7 @@ public final class ShortRange : kotlin.Range<kotlin.Short>, kotlin.Progression<k
public open override /*1*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ fun isEmpty(): kotlin.Boolean
public open override /*1*/ fun iterator(): kotlin.ShortIterator public open override /*1*/ fun iterator(): kotlin.ShortIterator
public class object Default { public default object Default {
/*primary*/ private constructor Default() /*primary*/ private constructor Default()
public final val EMPTY: kotlin.ShortRange public final val EMPTY: kotlin.ShortRange
public final fun <get-EMPTY>(): kotlin.ShortRange public final fun <get-EMPTY>(): kotlin.ShortRange
@@ -1456,7 +1456,7 @@ public final class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequenc
public final fun plus(/*0*/ other: kotlin.Any?): kotlin.String public final fun plus(/*0*/ other: kotlin.Any?): kotlin.String
public open override /*1*/ fun subSequence(/*0*/ start: kotlin.Int, /*1*/ end: kotlin.Int): kotlin.CharSequence public open override /*1*/ fun subSequence(/*0*/ start: kotlin.Int, /*1*/ end: kotlin.Int): kotlin.CharSequence
public class object Default { public default object Default {
/*primary*/ private constructor Default() /*primary*/ private constructor Default()
} }
} }
@@ -2,7 +2,7 @@
class C() { class C() {
val a: Int = 1 val a: Int = 1
class object { default object {
val x : Int val x : Int
{ {
@@ -1,7 +1,7 @@
class C() { class C() {
val a: Int = 1 val a: Int = 1
class object { default object {
val x : Int val x : Int
{ {
@@ -2,7 +2,7 @@
class C() { class C() {
val a: Int = 1 val a: Int = 1
class object { default object {
val x : Int val x : Int
{ {
@@ -1,5 +1,5 @@
class A { class A {
class object { default object {
var xi = 0 var xi = 0
var xin : Int? = 0 var xin : Int? = 0
var xinn : Int? = null var xinn : Int? = null
@@ -1,5 +1,5 @@
class C() { class C() {
class object { default object {
fun create() = C() fun create() = C()
} }
} }
@@ -1,7 +1,7 @@
fun Any.foo() = 1 fun Any.foo() = 1
class A { class A {
class object default object
} }
fun box() = if (A.foo() == 1) "OK" else "fail" fun box() = if (A.foo() == 1) "OK" else "fail"
@@ -1,7 +1,7 @@
var global = 0; var global = 0;
class C { class C {
class object { default object {
{ {
global = 1; global = 1;
} }
@@ -1,5 +1,5 @@
class A() { class A() {
class object { default object {
val value = 10 val value = 10
} }
} }
@@ -1,7 +1,7 @@
// EA-38323 - Illegal field modifiers in class: classObject field in C must be static and final // EA-38323 - Illegal field modifiers in class: classObject field in C must be static and final
trait C { trait C {
class object { default object {
public val FOO: String = "OK" public val FOO: String = "OK"
} }
} }
@@ -1,5 +1,5 @@
class A { class A {
class object { default object {
fun values() = "O" fun values() = "O"
fun valueOf() = "K" fun valueOf() = "K"
} }
@@ -1,4 +1,4 @@
class SomeClass { class object } class SomeClass { default object }
fun box() = fun box() =
if ((SomeClass.toString() as java.lang.String).matches("SomeClass\\\$Default@[0-9a-fA-F]+")) if ((SomeClass.toString() as java.lang.String).matches("SomeClass\\\$Default@[0-9a-fA-F]+"))
@@ -1,5 +1,5 @@
class C() { class C() {
class object { default object {
private fun <T> create() = C() private fun <T> create() = C()
} }
@@ -1,5 +1,5 @@
open class Test { open class Test {
class object { default object {
fun testStatic(ic: InnerClass): NotInnerClass = NotInnerClass(ic.value) fun testStatic(ic: InnerClass): NotInnerClass = NotInnerClass(ic.value)
} }
@@ -1,5 +1,5 @@
class C() { class C() {
class object Foo default object Foo
} }
fun C.Foo.create() = 3 fun C.Foo.create() = 3
@@ -4,7 +4,7 @@ public class StockMarketTableModel() {
return COLUMN_TITLES?.size()!! return COLUMN_TITLES?.size()!!
} }
class object { default object {
private val COLUMN_TITLES : Array<Int?> = arrayOfNulls<Int>(10) private val COLUMN_TITLES : Array<Int?> = arrayOfNulls<Int>(10)
} }
} }
@@ -1,5 +1,5 @@
class A { class A {
class object { default object {
val b = 0 val b = 0
val c = b val c = b
@@ -1,7 +1,7 @@
package x package x
class Outer() { class Outer() {
class object { default object {
class Inner() { class Inner() {
} }
} }
@@ -1,7 +1,7 @@
open class Factory(p: Int) open class Factory(p: Int)
class A { class A {
class object : Factory(1) default object : Factory(1)
} }
fun box() : String { fun box() : String {
@@ -2,7 +2,7 @@ package mult_constructors_3_bug
public open class Identifier() { public open class Identifier() {
private var myNullable : Boolean = true private var myNullable : Boolean = true
class object { default object {
open public fun init(isNullable : Boolean) : Identifier { open public fun init(isNullable : Boolean) : Identifier {
val __ = Identifier() val __ = Identifier()
__.myNullable = isNullable __.myNullable = isNullable
@@ -1,5 +1,5 @@
class C() { class C() {
class object Foo { default object Foo {
fun create() = 3 fun create() = 3
} }
} }
@@ -1,5 +1,5 @@
class Foo private(val param: String = "OK") { class Foo private(val param: String = "OK") {
class object { default object {
val s = Foo() val s = Foo()
} }
} }
@@ -1,5 +1,5 @@
class A { class A {
class object { default object {
fun Int.foo(a: Int = 1): Int { fun Int.foo(a: Int = 1): Int {
return a return a
} }
@@ -5,14 +5,14 @@ class Delegate<T>(var inner: T) {
class Foo (val f: Int) { class Foo (val f: Int) {
class object { default object {
val A: Foo by Delegate(Foo(11)) val A: Foo by Delegate(Foo(11))
var B: Foo by Delegate(Foo(11)) var B: Foo by Delegate(Foo(11))
} }
} }
trait FooTrait { trait FooTrait {
class object { default object {
val A: Foo by Delegate(Foo(11)) val A: Foo by Delegate(Foo(11))
var B: Foo by Delegate(Foo(11)) var B: Foo by Delegate(Foo(11))
} }
@@ -3,7 +3,7 @@ import java.util.IdentityHashMap
class A { class A {
var foo: Int by IntHandler var foo: Int by IntHandler
class object { default object {
var bar: Any? by AnyHandler var bar: Any? by AnyHandler
} }
} }
@@ -1,5 +1,5 @@
class A { class A {
class object { default object {
fun invoke(i: Int) = i fun invoke(i: Int) = i
} }
} }
@@ -8,7 +8,7 @@ internal final class A {
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
internal class object Default { internal default object Default {
private constructor Default() private constructor Default()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
@@ -3,7 +3,7 @@ trait B
fun B.invoke(i: Int) = i fun B.invoke(i: Int) = i
class A { class A {
class object: B { default object: B {
} }
} }
@@ -9,7 +9,7 @@ internal final class A {
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
internal class object Default : B { internal default object Default : B {
private constructor Default() private constructor Default()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
@@ -1,6 +1,6 @@
class A { class A {
class Nested { class Nested {
class object { default object {
fun invoke(i: Int) = i fun invoke(i: Int) = i
} }
} }
@@ -14,7 +14,7 @@ internal final class A {
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
internal class object Default { internal default object Default {
private constructor Default() private constructor Default()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
@@ -2,7 +2,7 @@ import A.Nested
class A { class A {
class Nested { class Nested {
class object { default object {
fun invoke(i: Int) = i fun invoke(i: Int) = i
} }
} }
@@ -14,7 +14,7 @@ internal final class A {
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
internal class object Default { internal default object Default {
private constructor Default() private constructor Default()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
@@ -3,7 +3,7 @@ enum class Game {
PAPER PAPER
SCISSORS SCISSORS
class object { default object {
fun foo() = ROCK fun foo() = ROCK
val bar = PAPER val bar = PAPER
} }
@@ -2,7 +2,7 @@ fun box() = if(Context.operatingSystemType == Context.Default.OsType.OTHER) "OK"
public class Context public class Context
{ {
class object default object
{ {
public enum class OsType { public enum class OsType {
LINUX; LINUX;
@@ -1,5 +1,5 @@
class A { class A {
class object {} default object {}
enum class E { enum class E {
OK OK
} }
@@ -1,5 +1,5 @@
class A { class A {
class object default object
} }
val foo: Any.() -> Unit = {} val foo: Any.() -> Unit = {}
@@ -1,6 +1,6 @@
class Test(val prop: String) { class Test(val prop: String) {
class object { default object {
public val prop : String = "CO"; public val prop : String = "CO";
} }
@@ -1,7 +1,7 @@
package someTest package someTest
public class Some private(val v: String) { public class Some private(val v: String) {
class object { default object {
public fun init(v: String): Some { public fun init(v: String): Some {
return Some(v) return Some(v)
} }
@@ -1,6 +1,6 @@
class Outer { class Outer {
class Nested { class Nested {
class object { default object {
val O = "O" val O = "O"
val K = "K" val K = "K"
} }
@@ -3,7 +3,7 @@ public abstract class FList<T>() {
public abstract val tail: FList<T> public abstract val tail: FList<T>
public abstract val empty: Boolean public abstract val empty: Boolean
class object { default object {
val emptyFList = object: FList<Any>() { val emptyFList = object: FList<Any>() {
public override val head: Any public override val head: Any
get() = throw UnsupportedOperationException(); get() = throw UnsupportedOperationException();
@@ -2,7 +2,7 @@ public open class Test() {
open public fun test() : Unit { open public fun test() : Unit {
System.out?.println(hello) System.out?.println(hello)
} }
class object { default object {
private val hello : String? = "Hello" private val hello : String? = "Hello"
} }
} }
@@ -1,5 +1,5 @@
class Clazz { class Clazz {
class object { default object {
val a = object { val a = object {
fun run(x: String) = x fun run(x: String) = x
} }
@@ -3,7 +3,7 @@ class Identifier<T>(t : T?, myHasDollar : Boolean) {
public fun getName() : T? { return myT } public fun getName() : T? { return myT }
class object { default object {
open public fun init<T>(name : T?) : Identifier<T> { open public fun init<T>(name : T?) : Identifier<T> {
val __ = Identifier<T>(name, false) val __ = Identifier<T>(name, false)
return __ return __
@@ -4,7 +4,7 @@ import java.io.*
open class AllEvenNum() { open class AllEvenNum() {
class object { default object {
open public fun main(args : Array<String?>?) : Unit { open public fun main(args : Array<String?>?) : Unit {
var i : Int = 1 var i : Int = 1
while ((i <= 100)) { while ((i <= 100)) {
@@ -14,7 +14,7 @@ public open class Identifier<T>(myName : T?, myHasDollar : Boolean) {
return myName return myName
} }
class object { default object {
open public fun init<T>(name : T?) : Identifier<T> { open public fun init<T>(name : T?) : Identifier<T> {
val __ = Identifier<T>(name, false) val __ = Identifier<T>(name, false)
return __ return __
@@ -1,6 +1,6 @@
class Test { class Test {
class object { default object {
public val prop1 : Int = 10 public val prop1 : Int = 10
@@ -1,7 +1,7 @@
abstract class ClassValAbstract { abstract class ClassValAbstract {
abstract var a: Int abstract var a: Int
class object { default object {
val methods = (this as java.lang.Object).getClass()?.getClassLoader()?.loadClass("ClassValAbstract")?.getMethods()!! val methods = (this as java.lang.Object).getClass()?.getClassLoader()?.loadClass("ClassValAbstract")?.getMethods()!!
} }
} }
@@ -8,7 +8,7 @@ class Identifier() {
return myNullable return myNullable
} }
class object { default object {
fun init(isNullable : Boolean) : Identifier { fun init(isNullable : Boolean) : Identifier {
val id = Identifier() val id = Identifier()
id.myNullable = isNullable id.myNullable = isNullable
@@ -1,6 +1,6 @@
class TestObject() class TestObject()
{ {
class object { default object {
var prop: Int = 1 var prop: Int = 1
get() = $prop++ get() = $prop++
} }
@@ -2,7 +2,7 @@ class CallbackBlock {}
public class Foo public class Foo
{ {
class object { default object {
private var bar = 0 private var bar = 0
} }
@@ -1,5 +1,5 @@
class Foo() { class Foo() {
class object { default object {
val bar = "OK"; val bar = "OK";
var boo = "FAIL"; var boo = "FAIL";
} }
@@ -1,5 +1,5 @@
class Foo { class Foo {
class object { default object {
val bar: String val bar: String
{ {
@@ -1,6 +1,6 @@
class A { class A {
class object { default object {
private var r: Int = 1; private var r: Int = 1;
fun test(): Int { fun test(): Int {
@@ -1,6 +1,6 @@
open class Bar<T>(val prop: String) open class Bar<T>(val prop: String)
class Foo { class Foo {
class object : Bar<Foo>("OK") { default object : Bar<Foo>("OK") {
val p = Foo.prop val p = Foo.prop
val p2 = prop val p2 = prop
val p3 = this.prop val p3 = this.prop
@@ -1,5 +1,5 @@
class A { class A {
class object: funClassObject() { default object: funClassObject() {
fun test(): String { fun test(): String {
return funClassObject.protectedFun()!! return funClassObject.protectedFun()!!
} }
@@ -10,7 +10,7 @@ class InlineAll {
return s() return s()
} }
class object { default object {
inline fun inline(s: () -> String): String { inline fun inline(s: () -> String): String {
return s() return s()
} }
@@ -6,7 +6,7 @@ trait InlineTrait {
return s() return s()
} }
class object { default object {
inline final fun finalInline(s: () -> String): String { inline final fun finalInline(s: () -> String): String {
return s() return s()
} }
@@ -1,12 +1,12 @@
class A { class A {
class object { default object {
val i1 = 1 val i1 = 1
val i2 = 2 val i2 = 2
} }
} }
class B { class B {
class object Named { default object Named {
val i1 = 3 val i1 = 3
val i2 = 4 val i2 = 4
} }
@@ -7,7 +7,7 @@ annotation class testAnnotation
class A { class A {
class object { default object {
val b: String = "OK" val b: String = "OK"
platformStatic testAnnotation fun test1() = b platformStatic testAnnotation fun test1() = b
@@ -2,7 +2,7 @@ import kotlin.platform.platformStatic
class A { class A {
class object { default object {
val b: String = "OK" val b: String = "OK"
platformStatic val c: String = "OK" platformStatic val c: String = "OK"
@@ -1,17 +1,17 @@
class Klass { class Klass {
class object { default object {
val NAME = "Klass" val NAME = "Klass"
} }
} }
trait Trait { trait Trait {
class object { default object {
val NAME = "Trait" val NAME = "Trait"
} }
} }
enum class Enoom { enum class Enoom {
class object { default object {
val NAME = "Enoom" val NAME = "Enoom"
} }
} }
@@ -32,7 +32,7 @@ annotation class Ann(
) )
class Foo { class Foo {
class object { default object {
val i: Int = 2 val i: Int = 2
val s: Short = 2 val s: Short = 2
val f: Float = 2.0.toFloat() val f: Float = 2.0.toFloat()
@@ -15,7 +15,7 @@ annotation class Ann(val i: Int)
class A { class A {
class B { class B {
class object { default object {
val i = 1 val i = 1
} }
} }
@@ -1,7 +1,7 @@
import kotlin.reflect.KMemberProperty import kotlin.reflect.KMemberProperty
class A { class A {
class object { default object {
val ref: KMemberProperty<A, String> = A::foo val ref: KMemberProperty<A, String> = A::foo
} }
@@ -1,5 +1,5 @@
class C { class C {
class object { default object {
val defaultGetter: Int = 1 val defaultGetter: Int = 1
[native] get [native] get
@@ -2,7 +2,7 @@ import kotlin.jvm.*
import kotlin.platform.* import kotlin.platform.*
class C { class C {
class object { default object {
private platformStatic native fun foo() private platformStatic native fun foo()
} }
@@ -4,7 +4,7 @@ import kotlin.jvm.*
import kotlin.platform.* import kotlin.platform.*
class WithNative { class WithNative {
class object { default object {
platformStatic native fun bar(l: Long, s: String): Double platformStatic native fun bar(l: Long, s: String): Double
} }
} }
@@ -1,7 +1,7 @@
import kotlin.platform.* import kotlin.platform.*
class C { class C {
class object { default object {
private platformStatic fun foo(): String { private platformStatic fun foo(): String {
return "OK" return "OK"
} }
@@ -1,5 +1,5 @@
class O { class O {
class object { default object {
// Currently we consider <clinit> in class O as the enclosing method of this lambda, // Currently we consider <clinit> in class O as the enclosing method of this lambda,
// so we write outer class = O and enclosing method = null // so we write outer class = O and enclosing method = null
val f = {} val f = {}
@@ -5,13 +5,13 @@ class G<T>(val s: T) {
} }
public trait ErrorsJvmTrait { public trait ErrorsJvmTrait {
class object { default object {
public val param : G<String> = G("STRING") public val param : G<String> = G("STRING")
} }
} }
public class ErrorsJvmClass { public class ErrorsJvmClass {
class object { default object {
public val param : G<String> = G("STRING") public val param : G<String> = G("STRING")
} }
} }
@@ -6,7 +6,7 @@ open class B
class A { class A {
class object { default object {
[platformStatic] [platformStatic]
fun <T: B> a(s: T) : T { fun <T: B> a(s: T) : T {
return s return s
@@ -1,7 +1,7 @@
import kotlin.test.assertEquals import kotlin.test.assertEquals
class A { class A {
class object { default object {
enum class Season { enum class Season {
WINTER WINTER
SPRING SPRING
@@ -1,7 +1,7 @@
class A { class A {
class object { default object {
val r: Int = 1; val r: Int = 1;
} }
} }
// A and class object constructor call // A and default object constructor call
// 2 ALOAD 0 // 2 ALOAD 0
@@ -1,8 +1,8 @@
class A { class A {
class object { default object {
private var r: Int = 1; private var r: Int = 1;
} }
} }
// A and class object constructor call // A and default object constructor call
// 2 ALOAD 0 // 2 ALOAD 0
// 1 synthetic access\$getR // 1 synthetic access\$getR
@@ -1,7 +1,7 @@
class C() { class C() {
fun getInstance(): Runnable = C fun getInstance(): Runnable = C
class object: Runnable { default object: Runnable {
override fun run(): Unit { } override fun run(): Unit { }
} }
} }
@@ -1,3 +1,3 @@
class A { class A {
class object default object
} }
@@ -1,5 +1,5 @@
class A { class A {
class object { default object {
class Foo(val a: Int = 1) {} class Foo(val a: Int = 1) {}
} }
} }
@@ -3,5 +3,5 @@ class A {
inner class C inner class C
} }
class object default object
} }
@@ -3,7 +3,7 @@ class A {
fun foo(): String = "" fun foo(): String = ""
class object { default object {
val y: Any? = 239 val y: Any? = 239
fun bar(): String = "" fun bar(): String = ""
@@ -2,7 +2,7 @@ package foo
class Foo { class Foo {
class object { default object {
fun objectFoo() { } fun objectFoo() { }
} }
@@ -13,7 +13,7 @@ class C {
get() = this get() = this
set(value) {} set(value) {}
class object { default object {
private val classObjectVal: Long private val classObjectVal: Long
get() = 1L get() = 1L
} }
@@ -1,7 +1,7 @@
package test package test
class WithClassObject { class WithClassObject {
class object { default object {
fun foo() {} fun foo() {}
val value: Int = 0 val value: Int = 0
@@ -4,7 +4,7 @@ import kotlin.platform.platformStatic
class A { class A {
class object { default object {
val b: String = "OK" val b: String = "OK"
platformStatic fun test1() { platformStatic fun test1() {
@@ -3,7 +3,7 @@ package test
import kotlin.platform.platformStatic import kotlin.platform.platformStatic
class A { class A {
class object { default object {
[platformStatic] val b: String = "OK" [platformStatic] val b: String = "OK"
var A.c: String var A.c: String
@@ -10,7 +10,7 @@ annotation class AFloat(val value: Float)
class Test { class Test {
class object { default object {
val vstring: String = "Test" val vstring: String = "Test"
val vchar: Char = 'c' val vchar: Char = 'c'
val vint: Int = 10 val vint: Int = 10
@@ -10,7 +10,7 @@ annotation class AFloat(val value: Float)
trait Test { trait Test {
class object { default object {
val vstring: String = "Test" val vstring: String = "Test"
val vchar: Char = 'c' val vchar: Char = 'c'
val vint: Int = 10 val vint: Int = 10
@@ -1,7 +1,7 @@
package test package test
class KotlinClass { class KotlinClass {
class object { default object {
val FOO: Int = 10 val FOO: Int = 10
} }
} }
@@ -2,7 +2,7 @@ package test
class Test { class Test {
class object { default object {
public val valProp: Int = 10 public val valProp: Int = 10
public var varProp: Int = 10 public var varProp: Int = 10
@@ -2,7 +2,7 @@ package test
trait Test { trait Test {
class object { default object {
public val valProp: Int = 10 public val valProp: Int = 10
} }
@@ -3,7 +3,7 @@ package library
public enum class EnumClass { public enum class EnumClass {
ENTRY ENTRY
public class object { public default object {
public fun entry(): EnumClass = ENTRY public fun entry(): EnumClass = ENTRY
} }
} }
@@ -1,5 +1,5 @@
class A { class A {
class object { default object {
fun foo() = 42 fun foo() = 42
val bar = "OK" val bar = "OK"
} }
@@ -17,7 +17,7 @@ trait G<X> {
class C() : A(), B class C() : A(), B
class D() { class D() {
class object : A(), B {} default object : A(), B {}
} }
class Test1<T : A>() class Test1<T : A>()
@@ -52,7 +52,7 @@ package Jet87 {
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
internal class object Default : Jet87.A, Jet87.B { internal default object Default : Jet87.A, Jet87.B {
private constructor Default() private constructor Default()
internal open override /*1*/ /*fake_override*/ fun bar(): kotlin.Double internal open override /*1*/ /*fake_override*/ fun bar(): kotlin.Double
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean

Some files were not shown because too many files have changed in this diff Show More