diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsClass.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsClass.txt index e0c8cb3c1ce..81c781e62f2 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsClass.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsClass.txt @@ -16,7 +16,7 @@ package test { public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - test.AnnClass(a = test.MyClass.class: java.lang.Class) internal companion object Companion { + test.AnnClass(a = javaClass(): java.lang.Class) internal companion object Companion { private constructor Companion() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/array.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/array.txt index 3f271c56e1c..26c7f65ff07 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/array.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/array.txt @@ -45,7 +45,7 @@ AnnAnn(i = {Ann(i = {IntegerValueType(1)}: kotlin.IntArray)}: kotlin.Array) public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -AnnJC(i = {Test.class}: kotlin.Array>) AnnJC(i = {}: kotlin.Array>) internal final class TestJC { +AnnJC(i = {javaClass()}: kotlin.Array>) AnnJC(i = {}: kotlin.Array>) internal final class TestJC { public constructor TestJC() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/classLiteral.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/classLiteral.txt index 909bac68e75..59bd6a99c4b 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/classLiteral.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/classLiteral.txt @@ -24,7 +24,7 @@ AnnC() internal final class Test { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -AnnC(c = A.class: java.lang.Class) internal final class Test2 { +AnnC(c = javaClass(): java.lang.Class) internal final class Test2 { public constructor Test2() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/vararg.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/vararg.txt index 3f1b84d29ce..f6782620b80 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/vararg.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/vararg.txt @@ -45,7 +45,7 @@ AnnAnn(i = {Ann(i = {IntegerValueType(1)}: kotlin.IntArray)}: kotlin.Array) public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -AnnJC(i = {Test.class}: kotlin.Array>) AnnJC(i = {}: kotlin.Array>) internal final class TestJC { +AnnJC(i = {javaClass()}: kotlin.Array>) AnnJC(i = {}: kotlin.Array>) internal final class TestJC { public constructor TestJC() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArray.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArray.txt index b9e9fb360fa..50088cd7bcb 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArray.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArray.txt @@ -3,9 +3,9 @@ package A(value = {"1", "2", "3"}: kotlin.Array, y = IntegerValueType(1): IntegerValueType(1)) internal fun test1(): kotlin.Unit A(value = {"4"}: kotlin.Array, y = IntegerValueType(2): IntegerValueType(2)) internal fun test2(): kotlin.Unit A(value = {{"5", "6"}, "7"}: kotlin.Array, y = IntegerValueType(3): IntegerValueType(3)) internal fun test3(): kotlin.Unit -A(value = {"1", "2", "3"}: kotlin.Array, x = kotlin.String.class: java.lang.Class, y = IntegerValueType(4): IntegerValueType(4)) internal fun test4(): kotlin.Unit +A(value = {"1", "2", "3"}: kotlin.Array, x = javaClass(): java.lang.Class, y = IntegerValueType(4): IntegerValueType(4)) internal fun test4(): kotlin.Unit A(value = {"4"}: kotlin.Array, y = IntegerValueType(5): IntegerValueType(5)) internal fun test5(): kotlin.Unit -A(value = {{"5", "6"}, "7"}: kotlin.Array, x = kotlin.Any.class: java.lang.Class, y = IntegerValueType(6): IntegerValueType(6)) internal fun test6(): kotlin.Unit +A(value = {{"5", "6"}, "7"}: kotlin.Array, x = javaClass(): java.lang.Class, y = IntegerValueType(6): IntegerValueType(6)) internal fun test6(): kotlin.Unit A(value = {}: kotlin.Array, y = IntegerValueType(7): IntegerValueType(7)) internal fun test7(): kotlin.Unit A(value = {"8", "9", "10"}: kotlin.Array) internal fun test8(): kotlin.Unit diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayAndOtherDefault.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayAndOtherDefault.txt index 4d1f00c75a0..f07179326b5 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayAndOtherDefault.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayAndOtherDefault.txt @@ -1,16 +1,16 @@ package A(value = {"1", "2", "3"}: kotlin.Array) internal fun test1(): kotlin.Unit -A(value = {"5", "6"}: kotlin.Array, x = kotlin.Any.class: java.lang.Class, y = IntegerValueType(3): IntegerValueType(3)) internal fun test10(): kotlin.Unit -A(value = {"5", "6", "7"}: kotlin.Array, x = kotlin.Any.class: java.lang.Class, y = IntegerValueType(3): IntegerValueType(3)) internal fun test11(): kotlin.Unit +A(value = {"5", "6"}: kotlin.Array, x = javaClass(): java.lang.Class, y = IntegerValueType(3): IntegerValueType(3)) internal fun test10(): kotlin.Unit +A(value = {"5", "6", "7"}: kotlin.Array, x = javaClass(): java.lang.Class, y = IntegerValueType(3): IntegerValueType(3)) internal fun test11(): kotlin.Unit A(value = {"4"}: kotlin.Array) internal fun test2(): kotlin.Unit A(value = {{"5", "6"}, "7"}: kotlin.Array) internal fun test3(): kotlin.Unit -A(value = {"1", "2", "3"}: kotlin.Array, x = kotlin.String.class: java.lang.Class) internal fun test4(): kotlin.Unit +A(value = {"1", "2", "3"}: kotlin.Array, x = javaClass(): java.lang.Class) internal fun test4(): kotlin.Unit A(value = {"4"}: kotlin.Array, y = IntegerValueType(2): IntegerValueType(2)) internal fun test5(): kotlin.Unit -A(value = {{"5", "6"}, "7"}: kotlin.Array, x = kotlin.Any.class: java.lang.Class, y = IntegerValueType(3): IntegerValueType(3)) internal fun test6(): kotlin.Unit +A(value = {{"5", "6"}, "7"}: kotlin.Array, x = javaClass(): java.lang.Class, y = IntegerValueType(3): IntegerValueType(3)) internal fun test6(): kotlin.Unit A(value = {}: kotlin.Array) internal fun test7(): kotlin.Unit A(value = {}: kotlin.Array) internal fun test8(): kotlin.Unit -A(value = {}: kotlin.Array, x = kotlin.Any.class: java.lang.Class, y = IntegerValueType(3): IntegerValueType(3)) internal fun test9(): kotlin.Unit +A(value = {}: kotlin.Array, x = javaClass(): java.lang.Class, y = IntegerValueType(3): IntegerValueType(3)) internal fun test9(): kotlin.Unit public final annotation class A : kotlin.Annotation { public /*synthesized*/ constructor A(/*0*/ vararg value: kotlin.String /*kotlin.Array*/, /*1*/ x: java.lang.Class<*> = ..., /*2*/ y: kotlin.Int = ...) diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/annotationAsArgument.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/annotationAsArgument.txt index d908943fbbd..03d03cea3ec 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/annotationAsArgument.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/annotationAsArgument.txt @@ -21,7 +21,7 @@ public final annotation class B : kotlin.Annotation { public abstract fun y(): kotlin.Int } -A(arg = kotlin.String.class: java.lang.Class, b = B(): B) internal final class MyClass1 { +A(arg = javaClass(): java.lang.Class, b = B(): B) internal final class MyClass1 { public constructor MyClass1() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @@ -35,21 +35,21 @@ A(b = B(y = IntegerValueType(3): IntegerValueType(3)): B) internal final class M public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -A(b = B(arg = kotlin.Double.class: java.lang.Class): B) internal final class MyClass4 { +A(b = B(arg = javaClass(): java.lang.Class): B) internal final class MyClass4 { public constructor MyClass4() 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 toString(): kotlin.String } -A(arg = kotlin.Boolean.class: java.lang.Class, b = B(arg = kotlin.Char::class: kotlin.reflect.KClass): B) internal final class MyClass5 { +A(arg = javaClass(): java.lang.Class, b = B(arg = kotlin.Char::class: kotlin.reflect.KClass): B) internal final class MyClass5 { public constructor MyClass5() 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 toString(): kotlin.String } -A(arg = kotlin.String::class: kotlin.reflect.KClass, b = B(arg = kotlin.Boolean.class: java.lang.Class): B) internal final class MyClass6 { +A(arg = kotlin.String::class: kotlin.reflect.KClass, b = B(arg = javaClass(): java.lang.Class): B) internal final class MyClass6 { public constructor MyClass6() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/arg.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/arg.txt index 0307898e112..89e5886fc42 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/arg.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/arg.txt @@ -9,7 +9,7 @@ public final annotation class A : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -A(arg = kotlin.String.class: java.lang.Class) internal final class MyClass { +A(arg = javaClass(): java.lang.Class) internal final class MyClass { public constructor MyClass() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argAndOtherDefault.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argAndOtherDefault.txt index aaf67b2cc02..ee6f9f6a4e1 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argAndOtherDefault.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argAndOtherDefault.txt @@ -10,14 +10,14 @@ public final annotation class A : kotlin.Annotation { public abstract fun x(): kotlin.Int } -A(arg = kotlin.String.class: java.lang.Class) internal final class MyClass1 { +A(arg = javaClass(): java.lang.Class) internal final class MyClass1 { public constructor MyClass1() 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 toString(): kotlin.String } -A(arg = kotlin.String.class: java.lang.Class, x = IntegerValueType(1): IntegerValueType(1)) internal final class MyClass2 { +A(arg = javaClass(): java.lang.Class, x = IntegerValueType(1): IntegerValueType(1)) internal final class MyClass2 { public constructor MyClass2() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argArray.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argArray.txt index 7ea7ccaa91f..b59dc6de114 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argArray.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argArray.txt @@ -9,21 +9,21 @@ public final annotation class A : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -A(arg = {kotlin.String.class, kotlin.Int.class}: kotlin.Array>>) internal final class MyClass1 { +A(arg = {javaClass(), javaClass()}: kotlin.Array>>) internal final class MyClass1 { public constructor MyClass1() 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 toString(): kotlin.String } -A(arg = {kotlin.String.class, kotlin.Int::class}: kotlin.Array) internal final class MyClass2 { +A(arg = {javaClass(), kotlin.Int::class}: kotlin.Array) internal final class MyClass2 { public constructor MyClass2() 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 toString(): kotlin.String } -A(arg = {kotlin.String::class, kotlin.Int.class}: kotlin.Array) internal final class MyClass3 { +A(arg = {kotlin.String::class, javaClass()}: kotlin.Array) internal final class MyClass3 { public constructor MyClass3() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argWithDefault.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argWithDefault.txt index b7b923fbb57..9129da9a33a 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argWithDefault.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argWithDefault.txt @@ -9,7 +9,7 @@ public final annotation class A : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -A(arg = kotlin.String.class: java.lang.Class) internal final class MyClass1 { +A(arg = javaClass(): java.lang.Class) internal final class MyClass1 { public constructor MyClass1() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argWithDefaultAndOther.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argWithDefaultAndOther.txt index 53d55a97b74..df68860bec8 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argWithDefaultAndOther.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/argWithDefaultAndOther.txt @@ -10,7 +10,7 @@ public final annotation class A : kotlin.Annotation { public abstract fun x(): kotlin.Int } -A(arg = kotlin.String.class: java.lang.Class, x = IntegerValueType(3): IntegerValueType(3)) internal final class MyClass1 { +A(arg = javaClass(): java.lang.Class, x = IntegerValueType(3): IntegerValueType(3)) internal final class MyClass1 { public constructor MyClass1() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/twoArgs.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/twoArgs.txt index 1bc02e5cc77..7c0e3f74936 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/twoArgs.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/twoArgs.txt @@ -10,21 +10,21 @@ public final annotation class A : kotlin.Annotation { public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } -A(arg1 = kotlin.String.class: java.lang.Class, arg2 = kotlin.Int.class: java.lang.Class) internal final class MyClass1 { +A(arg1 = javaClass(): java.lang.Class, arg2 = javaClass(): java.lang.Class) internal final class MyClass1 { public constructor MyClass1() 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 toString(): kotlin.String } -A(arg1 = kotlin.String.class: java.lang.Class, arg2 = kotlin.Int::class: kotlin.reflect.KClass) internal final class MyClass3 { +A(arg1 = javaClass(): java.lang.Class, arg2 = kotlin.Int::class: kotlin.reflect.KClass) internal final class MyClass3 { public constructor MyClass3() 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 toString(): kotlin.String } -A(arg1 = kotlin.String::class: kotlin.reflect.KClass, arg2 = kotlin.Int.class: java.lang.Class) internal final class MyClass4 { +A(arg1 = kotlin.String::class: kotlin.reflect.KClass, arg2 = javaClass(): java.lang.Class) internal final class MyClass4 { public constructor MyClass4() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/value.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/value.txt index 0e43d78cace..81ac930353a 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/value.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/value.txt @@ -9,14 +9,14 @@ public final annotation class A : kotlin.Annotation { public abstract fun value(): kotlin.reflect.KClass<*> } -A(value = kotlin.String.class: java.lang.Class) internal final class MyClass1 { +A(value = javaClass(): java.lang.Class) internal final class MyClass1 { public constructor MyClass1() 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 toString(): kotlin.String } -A(value = kotlin.String.class: java.lang.Class) internal final class MyClass2 { +A(value = javaClass(): java.lang.Class) internal final class MyClass2 { public constructor MyClass2() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueAndOtherDefault.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueAndOtherDefault.txt index 0a0f4a15ba2..fc2cecb1657 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueAndOtherDefault.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueAndOtherDefault.txt @@ -10,28 +10,28 @@ public final annotation class A : kotlin.Annotation { public abstract fun x(): kotlin.Int } -A(value = kotlin.String.class: java.lang.Class) internal final class MyClass1 { +A(value = javaClass(): java.lang.Class) internal final class MyClass1 { public constructor MyClass1() 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 toString(): kotlin.String } -A(value = kotlin.String.class: java.lang.Class) internal final class MyClass2 { +A(value = javaClass(): java.lang.Class) internal final class MyClass2 { public constructor MyClass2() 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 toString(): kotlin.String } -A(value = kotlin.String.class: java.lang.Class, x = IntegerValueType(1): IntegerValueType(1)) internal final class MyClass3 { +A(value = javaClass(): java.lang.Class, x = IntegerValueType(1): IntegerValueType(1)) internal final class MyClass3 { public constructor MyClass3() 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 toString(): kotlin.String } -A(value = kotlin.String.class: java.lang.Class, x = IntegerValueType(3): IntegerValueType(3)) internal final class MyClass4 { +A(value = javaClass(): java.lang.Class, x = IntegerValueType(3): IntegerValueType(3)) internal final class MyClass4 { public constructor MyClass4() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueArray.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueArray.txt index 6bedd924aa1..118edc89aa9 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueArray.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueArray.txt @@ -9,35 +9,35 @@ public final annotation class A : kotlin.Annotation { public abstract fun value(): kotlin.Array> } -A(value = {kotlin.String.class, kotlin.Int.class}: kotlin.Array>) internal final class MyClass1 { +A(value = {javaClass(), javaClass()}: kotlin.Array>) internal final class MyClass1 { public constructor MyClass1() 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 toString(): kotlin.String } -A(value = {kotlin.String.class, kotlin.Int.class}: kotlin.Array>>) internal final class MyClass2 { +A(value = {javaClass(), javaClass()}: kotlin.Array>>) internal final class MyClass2 { public constructor MyClass2() 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 toString(): kotlin.String } -A(value = {kotlin.String.class, kotlin.Int.class}: kotlin.Array>>) internal final class MyClass3 { +A(value = {javaClass(), javaClass()}: kotlin.Array>>) internal final class MyClass3 { public constructor MyClass3() 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 toString(): kotlin.String } -A(value = {kotlin.String.class, kotlin.Int::class}: kotlin.Array>) internal final class MyClass4 { +A(value = {javaClass(), kotlin.Int::class}: kotlin.Array>) internal final class MyClass4 { public constructor MyClass4() 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 toString(): kotlin.String } -A(value = {kotlin.String::class, kotlin.Int.class}: kotlin.Array>) internal final class MyClass5 { +A(value = {kotlin.String::class, javaClass()}: kotlin.Array>) internal final class MyClass5 { public constructor MyClass5() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueWithDefault.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueWithDefault.txt index 2acfcfd2012..3b6dc787cd4 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueWithDefault.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueWithDefault.txt @@ -9,14 +9,14 @@ public final annotation class A : kotlin.Annotation { public abstract fun value(): kotlin.reflect.KClass<*> } -A(value = kotlin.String.class: java.lang.Class) internal final class MyClass1 { +A(value = javaClass(): java.lang.Class) internal final class MyClass1 { public constructor MyClass1() 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 toString(): kotlin.String } -A(value = kotlin.String.class: java.lang.Class) internal final class MyClass2 { +A(value = javaClass(): java.lang.Class) internal final class MyClass2 { public constructor MyClass2() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueWithDefaultAndOther.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueWithDefaultAndOther.txt index 97b5ee1e16f..5725e85d7ab 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueWithDefaultAndOther.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationsWithJavaLangClassParameterOverload/valueWithDefaultAndOther.txt @@ -10,14 +10,14 @@ public final annotation class A : kotlin.Annotation { public abstract fun x(): kotlin.Int } -A(value = kotlin.String.class: java.lang.Class, x = IntegerValueType(1): IntegerValueType(1)) internal final class MyClass1 { +A(value = javaClass(): java.lang.Class, x = IntegerValueType(1): IntegerValueType(1)) internal final class MyClass1 { public constructor MyClass1() 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 toString(): kotlin.String } -A(value = kotlin.String.class: java.lang.Class, x = IntegerValueType(3): IntegerValueType(3)) internal final class MyClass2 { +A(value = javaClass(): java.lang.Class, x = IntegerValueType(3): IntegerValueType(3)) internal final class MyClass2 { public constructor MyClass2() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/qualifiedCallValue.txt b/compiler/testData/diagnostics/testsWithStdLib/annotations/qualifiedCallValue.txt index 8f8d4e715f1..b0860f9b57c 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/qualifiedCallValue.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/qualifiedCallValue.txt @@ -5,7 +5,7 @@ package a { package a.b { package a.b.c { - kotlin.deprecated(value = "aaa": kotlin.String) a.b.c.ann1(p = kotlin.deprecated(value = "aaa": kotlin.String): kotlin.deprecated) a.b.c.ann1() a.b.c.ann2(p = a.b.c.ann1(): a.b.c.ann1) a.b.c.A.IAnn() a.b.c.ann3(p = a.b.c.A.IAnn(): a.b.c.A.IAnn) a.b.c.A.IAnn() a.b.c.ann3(p = a.b.c.A.IAnn(): a.b.c.A.IAnn) a.b.c.annJavaClass(p = a.b.c.A.class: java.lang.Class) a.b.c.annArray(p = {"a"}: kotlin.Array) internal fun test(): kotlin.Int + kotlin.deprecated(value = "aaa": kotlin.String) a.b.c.ann1(p = kotlin.deprecated(value = "aaa": kotlin.String): kotlin.deprecated) a.b.c.ann1() a.b.c.ann2(p = a.b.c.ann1(): a.b.c.ann1) a.b.c.A.IAnn() a.b.c.ann3(p = a.b.c.A.IAnn(): a.b.c.A.IAnn) a.b.c.A.IAnn() a.b.c.ann3(p = a.b.c.A.IAnn(): a.b.c.A.IAnn) a.b.c.annJavaClass(p = javaClass(): java.lang.Class) a.b.c.annArray(p = {"a"}: kotlin.Array) internal fun test(): kotlin.Int internal final class A { public constructor A() diff --git a/compiler/testData/loadJava/compiledJava/annotations/ClassObjectArrayInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/ClassObjectArrayInParam.txt index 26d36ac184a..f80c3d9e18d 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/ClassObjectArrayInParam.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/ClassObjectArrayInParam.txt @@ -9,7 +9,7 @@ public open class ClassObjectArrayInParam { public abstract fun value(): kotlin.Array> } - test.ClassObjectArrayInParam.Anno(value = {test.ClassObjectArrayInParam.class, test.ClassObjectArrayInParam.Nested.class, kotlin.String.class}: kotlin.Array>) public open class Nested { + test.ClassObjectArrayInParam.Anno(value = {javaClass(), javaClass(), javaClass()}: kotlin.Array>) public open class Nested { public constructor Nested() } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParam.txt index eadc5c00746..ebf800701e0 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParam.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParam.txt @@ -9,7 +9,7 @@ public open class ClassObjectInParam { public abstract fun value(): kotlin.reflect.KClass<*> } - test.ClassObjectInParam.Anno(value = test.ClassObjectInParam.class: java.lang.Class) public open class Nested { + test.ClassObjectInParam.Anno(value = javaClass(): java.lang.Class) public open class Nested { public constructor Nested() } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamRaw.txt b/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamRaw.txt index 22daaf3f0ae..8e29719e16c 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamRaw.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamRaw.txt @@ -10,7 +10,7 @@ public open class ClassObjectInParamRaw { public abstract fun value(): kotlin.reflect.KClass<*> } - test.ClassObjectInParamRaw.Anno(arg = {}: kotlin.Array>, value = test.ClassObjectInParamRaw.class: java.lang.Class) public open class Nested { + test.ClassObjectInParamRaw.Anno(arg = {}: kotlin.Array>, value = javaClass(): java.lang.Class) public open class Nested { public constructor Nested() } } diff --git a/compiler/tests/org/jetbrains/kotlin/resolve/annotation/AnnotationDescriptorResolveTest.java b/compiler/tests/org/jetbrains/kotlin/resolve/annotation/AnnotationDescriptorResolveTest.java index 9ab1f47614f..e32c2eceffb 100644 --- a/compiler/tests/org/jetbrains/kotlin/resolve/annotation/AnnotationDescriptorResolveTest.java +++ b/compiler/tests/org/jetbrains/kotlin/resolve/annotation/AnnotationDescriptorResolveTest.java @@ -87,7 +87,7 @@ public class AnnotationDescriptorResolveTest extends AbstractAnnotationDescripto public void testJavaClassAnnotation() throws Exception { String content = getContent("AnnClass(javaClass())"); - String expectedAnnotation = "AnnClass(a = MyClass.class: Class)"; + String expectedAnnotation = "AnnClass(a = javaClass(): Class)"; doTest(content, expectedAnnotation); } } diff --git a/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.java b/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.java index 7900db42f7f..d265142d3a5 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.java +++ b/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererImpl.java @@ -609,7 +609,7 @@ public class DescriptorRendererImpl implements DescriptorRenderer { @Override public String visitJavaClassValue(JavaClassValue value, Void data) { - return renderType(value.getValue()) + ".class"; + return "javaClass<" + renderType(value.getValue()) + ">()"; } @Override