diff --git a/compiler/testData/evaluate/constant/classObjectProperty.kt b/compiler/testData/evaluate/constant/classObjectProperty.kt index 2e97619bf8d..3dd9882da19 100644 --- a/compiler/testData/evaluate/constant/classObjectProperty.kt +++ b/compiler/testData/evaluate/constant/classObjectProperty.kt @@ -1,16 +1,16 @@ package test -// val prop1: 1.toInt() +// val prop1: 1 val prop1 = A.a -// val prop2: 2.toInt() +// val prop2: 2 val prop2 = A.a + 1 class A { - // val prop3: 1.toInt() + // val prop3: 1 val prop3 = A.a - // val prop4: 2.toInt() + // val prop4: 2 val prop4 = A.a + 1 class object { @@ -19,26 +19,26 @@ class A { } fun foo() { - // val prop5: 1.toInt() + // val prop5: 1 val prop5 = A.a - // val prop6: 2.toInt() + // val prop6: 2 val prop6 = A.a + 1 val b = { - // val prop11: 1.toInt() + // val prop11: 1 val prop11 = A.a - // val prop12: 2.toInt() + // val prop12: 2 val prop12 = A.a + 1 } val c = object: Foo { override fun f() { - // val prop9: 1.toInt() + // val prop9: 1 val prop9 = A.a - // val prop10: 2.toInt() + // val prop10: 2 val prop10 = A.a + 1 } } diff --git a/compiler/testData/evaluate/constant/compareTo.kt b/compiler/testData/evaluate/constant/compareTo.kt index d0ecde47797..15fde0e67e5 100644 --- a/compiler/testData/evaluate/constant/compareTo.kt +++ b/compiler/testData/evaluate/constant/compareTo.kt @@ -12,7 +12,7 @@ val prop3 = 1 <= 2 // val prop4: false val prop4 = 1 >= 2 -// val prop5: -1.toInt() +// val prop5: -1 val prop5 = 1.compareTo(2) // val prop6: false diff --git a/compiler/testData/evaluate/constant/finalProperty.kt b/compiler/testData/evaluate/constant/finalProperty.kt index 89bcbf05f59..74c23ffa565 100644 --- a/compiler/testData/evaluate/constant/finalProperty.kt +++ b/compiler/testData/evaluate/constant/finalProperty.kt @@ -1,41 +1,41 @@ package test -// val prop1: 1.toInt() +// val prop1: 1 val prop1 = A().a -// val prop2: 2.toInt() +// val prop2: 2 val prop2 = A().a + 1 class A() { val a = 1 - // val prop3: 1.toInt() + // val prop3: 1 val prop3 = a - // val prop4: 2.toInt() + // val prop4: 2 val prop4 = a + 1 fun foo() { - // val prop5: 1.toInt() + // val prop5: 1 val prop5 = A().a - // val prop6: 2.toInt() + // val prop6: 2 val prop6 = A().a + 1 val b = { - // val prop11: 1.toInt() + // val prop11: 1 val prop11 = A().a - // val prop12: 2.toInt() + // val prop12: 2 val prop12 = A().a + 1 } val c = object: Foo { override fun f() { - // val prop9: 1.toInt() + // val prop9: 1 val prop9 = A().a - // val prop10: 2.toInt() + // val prop10: 2 val prop10 = A().a + 1 } } @@ -43,10 +43,10 @@ class A() { } fun foo() { - // val prop7: 1.toInt() + // val prop7: 1 val prop7 = A().a - // val prop8: 2.toInt() + // val prop8: 2 val prop8 = A().a + 1 } diff --git a/compiler/testData/evaluate/constant/localVal.kt b/compiler/testData/evaluate/constant/localVal.kt index 20c59bf6e18..fb86944ab89 100644 --- a/compiler/testData/evaluate/constant/localVal.kt +++ b/compiler/testData/evaluate/constant/localVal.kt @@ -4,34 +4,34 @@ class A() { fun foo() { val a = 1 - // val prop5: 1.toInt() + // val prop5: 1 val prop5 = a - // val prop6: 2.toInt() + // val prop6: 2 val prop6 = a + 1 fun local() { - // val prop1: 1.toInt() + // val prop1: 1 val prop1 = a - // val prop2: 2.toInt() + // val prop2: 2 val prop2 = a + 1 } val b = { - // val prop3: 1.toInt() + // val prop3: 1 val prop3 = a - // val prop4: 2.toInt() + // val prop4: 2 val prop4 = a + 1 } val c = object: Foo { override fun f() { - // val prop9: 1.toInt() + // val prop9: 1 val prop9 = a - // val prop10: 2.toInt() + // val prop10: 2 val prop10 = a + 1 } } @@ -41,10 +41,10 @@ class A() { fun foo() { val a = 1 - // val prop7: 1.toInt() + // val prop7: 1 val prop7 = a - // val prop8: 2.toInt() + // val prop8: 2 val prop8 = a + 1 } diff --git a/compiler/testData/evaluate/constant/topLevelVal.kt b/compiler/testData/evaluate/constant/topLevelVal.kt index e2f60326ea5..602dcbdfa88 100644 --- a/compiler/testData/evaluate/constant/topLevelVal.kt +++ b/compiler/testData/evaluate/constant/topLevelVal.kt @@ -2,43 +2,43 @@ package test val a = 1 -// val prop1: 1.toInt() +// val prop1: 1 val prop1 = a -// val prop2: 2.toInt() +// val prop2: 2 val prop2 = a + 1 class A { - // val prop3: 1.toInt() + // val prop3: 1 val prop3 = a - // val prop4: 2.toInt() + // val prop4: 2 val prop4 = a + 1 val b = { - // val prop11: 1.toInt() + // val prop11: 1 val prop11 = a - // val prop12: 2.toInt() + // val prop12: 2 val prop12 = a + 1 } val c = object: Foo { override fun f() { - // val prop9: 1.toInt() + // val prop9: 1 val prop9 = a - // val prop10: 2.toInt() + // val prop10: 2 val prop10 = a + 1 } } } fun foo() { - // val prop5: 1.toInt() + // val prop5: 1 val prop5 = a - // val prop6: 2.toInt() + // val prop6: 2 val prop6 = a + 1 } diff --git a/compiler/testData/evaluate/constant/unaryMinusIndepWoExpType.kt b/compiler/testData/evaluate/constant/unaryMinusIndepWoExpType.kt index 64858fce468..c2c103901a9 100644 --- a/compiler/testData/evaluate/constant/unaryMinusIndepWoExpType.kt +++ b/compiler/testData/evaluate/constant/unaryMinusIndepWoExpType.kt @@ -1,6 +1,6 @@ package test -// val p1: -1.toInt() +// val p1: -1 val p1 = -1 // val p2: -1.toLong() @@ -9,14 +9,14 @@ val p2 = -1.toLong() // val p3: -1.toByte() val p3 = (-1).toByte() -// val p3a: -1.toInt() +// val p3a: -1 val p3a =-1.toByte() -// val p4: -1.toInt() +// val p4: -1 val p4 = -1.toInt() // val p5: -1.toShort() val p5 = (-1).toShort() -// val p5a: -1.toInt() +// val p5a: -1 val p5a = -1.toShort() diff --git a/compiler/testData/evaluate/constant/unaryMinusIndependentExpType.kt b/compiler/testData/evaluate/constant/unaryMinusIndependentExpType.kt index e78abcf273b..8df0a8708a2 100644 --- a/compiler/testData/evaluate/constant/unaryMinusIndependentExpType.kt +++ b/compiler/testData/evaluate/constant/unaryMinusIndependentExpType.kt @@ -1,6 +1,6 @@ package test -// val p1: -1.toInt() +// val p1: -1 val p1: Int = -1 // val p2: -1.toLong() @@ -25,39 +25,39 @@ val l3: Int = -1.toLong() val l4: Short = -1.toLong() -// val b1: -1.toInt() +// val b1: -1 val b1: Byte = -1.toByte() -// val b2: -1.toInt() +// val b2: -1 val b2: Int = -1.toByte() -// val b3: -1.toInt() +// val b3: -1 val b3: Long = -1.toByte() -// val b4: -1.toInt() +// val b4: -1 val b4: Short = -1.toByte() -// val i1: -1.toInt() +// val i1: -1 val i1: Byte = -1.toInt() -// val i2: -1.toInt() +// val i2: -1 val i2: Int = -1.toInt() -// val i3: -1.toInt() +// val i3: -1 val i3: Long = -1.toInt() -// val i4: -1.toInt() +// val i4: -1 val i4: Short = -1.toInt() -// val s1: -1.toInt() +// val s1: -1 val s1: Byte = -1.toShort() -// val s2: -1.toInt() +// val s2: -1 val s2: Int = -1.toShort() -// val s3: -1.toInt() +// val s3: -1 val s3: Long = -1.toShort() -// val s4: -1.toInt() +// val s4: -1 val s4: Short = -1.toShort() \ No newline at end of file diff --git a/compiler/testData/loadJava/compiledJava/annotations/ArithmeticExpressionInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/ArithmeticExpressionInParam.txt index abbdea05cc9..b22e856e8cf 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/ArithmeticExpressionInParam.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/ArithmeticExpressionInParam.txt @@ -8,7 +8,7 @@ public open class ArithmeticExpressionInParam : java.lang.Object { public abstract fun value(): kotlin.Int } - test.ArithmeticExpressionInParam.Anno(value = 42.toInt(): kotlin.Int) public open class Class : java.lang.Object { + test.ArithmeticExpressionInParam.Anno(value = 42: kotlin.Int) public open class Class : java.lang.Object { public constructor Class() } } diff --git a/compiler/testData/loadJava/compiledJava/annotations/PrimitiveValueInParam.txt b/compiler/testData/loadJava/compiledJava/annotations/PrimitiveValueInParam.txt index e997556a28f..41a81afd4f9 100644 --- a/compiler/testData/loadJava/compiledJava/annotations/PrimitiveValueInParam.txt +++ b/compiler/testData/loadJava/compiledJava/annotations/PrimitiveValueInParam.txt @@ -2,7 +2,7 @@ package test public trait PrimitiveValueInParam : java.lang.Object { - test.PrimitiveValueInParam.Ann(bool = true: kotlin.Boolean, d = 1.0.toDouble(): kotlin.Double, f = 1.0.toFloat(): kotlin.Float, i = 1.toInt(): kotlin.Int, l = 1.toLong(): kotlin.Long, str = "str": kotlin.String) public open class A : java.lang.Object { + test.PrimitiveValueInParam.Ann(bool = true: kotlin.Boolean, d = 1.0.toDouble(): kotlin.Double, f = 1.0.toFloat(): kotlin.Float, i = 1: kotlin.Int, l = 1.toLong(): kotlin.Long, str = "str": kotlin.String) public open class A : java.lang.Object { public constructor A() } diff --git a/compiler/testData/loadJava/compiledJavaCompareWithKotlin/FinalFieldAsVal.txt b/compiler/testData/loadJava/compiledJavaCompareWithKotlin/FinalFieldAsVal.txt index b672df9e2ae..ebc1dbeae9a 100644 --- a/compiler/testData/loadJava/compiledJavaCompareWithKotlin/FinalFieldAsVal.txt +++ b/compiler/testData/loadJava/compiledJavaCompareWithKotlin/FinalFieldAsVal.txt @@ -2,5 +2,5 @@ package test public final class FinalFieldAsVal : java.lang.Object { public constructor FinalFieldAsVal() - public final val f: kotlin.Int = 1.toInt() + public final val f: kotlin.Int = 1 } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.txt index a2087b9d40f..6dd70345ad6 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.txt @@ -8,7 +8,7 @@ internal final class A { internal class object { /*primary*/ private constructor () - internal final val TEST: kotlin.Int = 1.toInt() + internal final val TEST: kotlin.Int = 1 internal final fun (): kotlin.Int } } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.txt index 42350ffd6a8..fb5e84fb943 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.txt @@ -18,7 +18,7 @@ internal final annotation class CharAnno : kotlin.Annotation { internal final fun (): kotlin.Char } -test.IntAnno(value = 42.toInt(): kotlin.Int) test.ShortAnno(value = 42.toShort(): kotlin.Short) test.ByteAnno(value = 42.toByte(): kotlin.Byte) test.LongAnno(value = 42.toLong(): kotlin.Long) test.CharAnno(value = #65(A): kotlin.Char) test.BooleanAnno(value = false: kotlin.Boolean) test.FloatAnno(value = 3.14.toFloat(): kotlin.Float) test.DoubleAnno(value = 3.14.toDouble(): kotlin.Double) internal final class Class { +test.IntAnno(value = 42: kotlin.Int) test.ShortAnno(value = 42.toShort(): kotlin.Short) test.ByteAnno(value = 42.toByte(): kotlin.Byte) test.LongAnno(value = 42.toLong(): kotlin.Long) test.CharAnno(value = #65(A): kotlin.Char) test.BooleanAnno(value = false: kotlin.Boolean) test.FloatAnno(value = 3.14.toFloat(): kotlin.Float) test.DoubleAnno(value = 3.14.toDouble(): kotlin.Double) internal final class Class { /*primary*/ public constructor Class() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.txt b/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.txt index b317a61f88b..1c8c0d7b6a0 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.txt @@ -10,6 +10,6 @@ internal final annotation class Anno : kotlin.Annotation { internal final fun (): kotlin.String } -test.Anno(double = 3.14.toDouble(): kotlin.Double, int = 42.toInt(): kotlin.Int, string = "OK": kotlin.String) internal final class Class { +test.Anno(double = 3.14.toDouble(): kotlin.Double, int = 42: kotlin.Int, string = "OK": kotlin.String) internal final class Class { /*primary*/ public constructor Class() } diff --git a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.txt b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.txt index 8618a65ea17..78f430706b7 100644 --- a/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.txt +++ b/compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.txt @@ -1,6 +1,6 @@ package test -test.Anno(t = ElementType.FIELD: java.lang.annotation.ElementType) internal val bar: kotlin.Int = 42.toInt() +test.Anno(t = ElementType.FIELD: java.lang.annotation.ElementType) internal val bar: kotlin.Int = 42 internal fun (): kotlin.Int test.Anno(t = ElementType.METHOD: java.lang.annotation.ElementType) internal fun foo(): kotlin.Unit diff --git a/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.txt b/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.txt index 2b8f780bd99..6e245a31275 100644 --- a/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.txt +++ b/compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.txt @@ -2,12 +2,12 @@ package test internal final class ConstructorTypeParamClassObjectConflict { /*primary*/ public constructor ConstructorTypeParamClassObjectConflict() - internal final val some: kotlin.Int = 12.toInt() + internal final val some: kotlin.Int = 12 internal final fun (): kotlin.Int internal class object { /*primary*/ private constructor () - internal final val test: kotlin.Int = 12.toInt() + internal final val test: kotlin.Int = 12 internal final fun (): kotlin.Int } } @@ -34,7 +34,7 @@ internal final class TestClassObjectAndClassConflict { internal class object { /*primary*/ private constructor () - internal final val bla: kotlin.Int = 12.toInt() + internal final val bla: kotlin.Int = 12 internal final fun (): kotlin.Int } } @@ -46,7 +46,7 @@ internal final class TestConstructorParamClassObjectConflict { internal class object { /*primary*/ private constructor () - internal final val test: kotlin.Int = 12.toInt() + internal final val test: kotlin.Int = 12 internal final fun (): kotlin.Int } } @@ -60,7 +60,7 @@ internal final class TestConstructorValClassObjectConflict { internal class object { /*primary*/ private constructor () - internal final val test: kotlin.Int = 12.toInt() + internal final val test: kotlin.Int = 12 internal final fun (): kotlin.Int } } diff --git a/compiler/testData/loadJava/compiledKotlin/class/NamedObjectWithAnotherTopLevelProperty.txt b/compiler/testData/loadJava/compiledKotlin/class/NamedObjectWithAnotherTopLevelProperty.txt index ceaef047f40..f85afcd7bb4 100644 --- a/compiler/testData/loadJava/compiledKotlin/class/NamedObjectWithAnotherTopLevelProperty.txt +++ b/compiler/testData/loadJava/compiledKotlin/class/NamedObjectWithAnotherTopLevelProperty.txt @@ -1,6 +1,6 @@ package test -internal val x: kotlin.Int = 5.toInt() +internal val x: kotlin.Int = 5 internal fun (): kotlin.Int public object Obj { diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.txt b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.txt index 22dc6622d7a..e49867daa90 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.txt @@ -5,7 +5,7 @@ internal final class ClassObjectDeclaresProperty { internal class object { /*primary*/ private constructor () - internal final val i: kotlin.Int = 1.toInt() + internal final val i: kotlin.Int = 1 internal final fun (): kotlin.Int } } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.txt b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.txt index 5723a01432b..fe133f4804b 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.txt @@ -2,12 +2,12 @@ package test internal final class A { /*primary*/ public constructor A() - internal final val other: kotlin.Int = 1.toInt() + internal final val other: kotlin.Int = 1 internal final fun (): kotlin.Int internal class object { /*primary*/ private constructor () - internal final val some: kotlin.Int = 1.toInt() + internal final val some: kotlin.Int = 1 internal final fun (): kotlin.Int } } diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.txt b/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.txt index c2f68ca8e9f..98d9f6dbd32 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.txt @@ -5,12 +5,12 @@ internal final class Test { internal class object { /*primary*/ private constructor () - public final val prop1: kotlin.Int = 10.toInt() + public final val prop1: kotlin.Int = 10 public final fun (): kotlin.Int public final var prop2: kotlin.Int public final fun (): kotlin.Int protected final fun (/*0*/ : kotlin.Int): kotlin.Unit - public final val prop3: kotlin.Int = 12.toInt() + public final val prop3: kotlin.Int = 12 public final fun (): kotlin.Int internal final var prop4: kotlin.Int internal final fun (): kotlin.Int diff --git a/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.txt b/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.txt index 4a1c26def71..650d0897bc0 100644 --- a/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.txt +++ b/compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.txt @@ -4,12 +4,12 @@ internal trait Test { internal class object { /*primary*/ private constructor () - public final val prop1: kotlin.Int = 10.toInt() + public final val prop1: kotlin.Int = 10 public final fun (): kotlin.Int public final var prop2: kotlin.Int public final fun (): kotlin.Int protected final fun (/*0*/ : kotlin.Int): kotlin.Unit - public final val prop3: kotlin.Int = 12.toInt() + public final val prop3: kotlin.Int = 12 public final fun (): kotlin.Int internal final var prop4: kotlin.Int internal final fun (): kotlin.Int diff --git a/compiler/testData/loadJava/compiledKotlin/prop/ClassVal.txt b/compiler/testData/loadJava/compiledKotlin/prop/ClassVal.txt index ebb87412103..dfa859a01ae 100644 --- a/compiler/testData/loadJava/compiledKotlin/prop/ClassVal.txt +++ b/compiler/testData/loadJava/compiledKotlin/prop/ClassVal.txt @@ -2,6 +2,6 @@ package test internal final class ClassVal { /*primary*/ public constructor ClassVal() - internal final val aa: kotlin.Int = 1.toInt() + internal final val aa: kotlin.Int = 1 internal final fun (): kotlin.Int } diff --git a/compiler/testData/loadJava/compiledKotlin/prop/NsVal.txt b/compiler/testData/loadJava/compiledKotlin/prop/NsVal.txt index f7793e0ca7c..7a7db098866 100644 --- a/compiler/testData/loadJava/compiledKotlin/prop/NsVal.txt +++ b/compiler/testData/loadJava/compiledKotlin/prop/NsVal.txt @@ -1,4 +1,4 @@ package test -internal val nsVal: kotlin.Int = 1.toInt() +internal val nsVal: kotlin.Int = 1 internal fun (): kotlin.Int diff --git a/compiler/testData/loadJava/compiledKotlin/prop/PropFromSuperclass.txt b/compiler/testData/loadJava/compiledKotlin/prop/PropFromSuperclass.txt index a6cd4beba1c..3855980fb7a 100644 --- a/compiler/testData/loadJava/compiledKotlin/prop/PropFromSuperclass.txt +++ b/compiler/testData/loadJava/compiledKotlin/prop/PropFromSuperclass.txt @@ -2,7 +2,7 @@ package test internal open class BaseClass { /*primary*/ public constructor BaseClass() - internal final val exactly: kotlin.Int = 17.toInt() + internal final val exactly: kotlin.Int = 17 internal final fun (): kotlin.Int } diff --git a/compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVal.txt b/compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVal.txt index 8a6fbf3ef86..1ab992647f0 100644 --- a/compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVal.txt +++ b/compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVal.txt @@ -2,14 +2,14 @@ package test internal final class ClassVal { /*primary*/ public constructor ClassVal() - internal final val property1: kotlin.Int = 1.toInt() + internal final val property1: kotlin.Int = 1 internal final fun (): kotlin.Int - internal final val property2: kotlin.Int = 1.toInt() + internal final val property2: kotlin.Int = 1 internal final fun (): kotlin.Int private final val property3: java.lang.Object private final fun (): java.lang.Object protected final val property4: kotlin.String = "" protected final fun (): kotlin.String - public final val property5: kotlin.Int = 1.toInt() + public final val property5: kotlin.Int = 1 public final fun (): kotlin.Int } diff --git a/compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValWithGet.txt b/compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValWithGet.txt index 8a6fbf3ef86..1ab992647f0 100644 --- a/compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValWithGet.txt +++ b/compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValWithGet.txt @@ -2,14 +2,14 @@ package test internal final class ClassVal { /*primary*/ public constructor ClassVal() - internal final val property1: kotlin.Int = 1.toInt() + internal final val property1: kotlin.Int = 1 internal final fun (): kotlin.Int - internal final val property2: kotlin.Int = 1.toInt() + internal final val property2: kotlin.Int = 1 internal final fun (): kotlin.Int private final val property3: java.lang.Object private final fun (): java.lang.Object protected final val property4: kotlin.String = "" protected final fun (): kotlin.String - public final val property5: kotlin.Int = 1.toInt() + public final val property5: kotlin.Int = 1 public final fun (): kotlin.Int } diff --git a/compiler/testData/loadJava/compiledKotlin/visibility/InternalAbstractTraitMembersOverridden.txt b/compiler/testData/loadJava/compiledKotlin/visibility/InternalAbstractTraitMembersOverridden.txt index fb436435208..77eedc3d50c 100644 --- a/compiler/testData/loadJava/compiledKotlin/visibility/InternalAbstractTraitMembersOverridden.txt +++ b/compiler/testData/loadJava/compiledKotlin/visibility/InternalAbstractTraitMembersOverridden.txt @@ -14,7 +14,7 @@ internal final class B : test.A { public open override /*1*/ var p: kotlin.Int public open override /*1*/ fun (): kotlin.Int public open override /*1*/ fun (/*0*/ : kotlin.Int): kotlin.Unit - internal open override /*1*/ val v: kotlin.Int = 0.toInt() + internal open override /*1*/ val v: kotlin.Int = 0 internal open override /*1*/ fun (): kotlin.Int internal open override /*1*/ fun f(): kotlin.Int } diff --git a/compiler/testData/loadJava/compiledKotlin/visibility/InternalTopLevelMembers.txt b/compiler/testData/loadJava/compiledKotlin/visibility/InternalTopLevelMembers.txt index 99af16e9b67..3414dc51bc6 100644 --- a/compiler/testData/loadJava/compiledKotlin/visibility/InternalTopLevelMembers.txt +++ b/compiler/testData/loadJava/compiledKotlin/visibility/InternalTopLevelMembers.txt @@ -1,5 +1,5 @@ package test -internal val x: kotlin.Int = 0.toInt() +internal val x: kotlin.Int = 0 internal fun (): kotlin.Int internal fun f(): kotlin.Int diff --git a/compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelVal.txt b/compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelVal.txt index 929aa09440b..e3acb6ae6fc 100644 --- a/compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelVal.txt +++ b/compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelVal.txt @@ -1,4 +1,4 @@ package test -private val topLevelVal: kotlin.Int = 0.toInt() +private val topLevelVal: kotlin.Int = 0 private fun (): kotlin.Int diff --git a/compiler/testData/resolveAnnotations/parameters/char.kt b/compiler/testData/resolveAnnotations/parameters/char.kt index 2e3a893118e..8b50283fd74 100644 --- a/compiler/testData/resolveAnnotations/parameters/char.kt +++ b/compiler/testData/resolveAnnotations/parameters/char.kt @@ -13,4 +13,4 @@ annotation class Ann( Ann('c', 99.toChar(), 'c'.toInt(), 'c'.toLong(), 'c'.toByte(), 'c'.toShort(), 'c'.toDouble(), 'c'.toFloat()) class MyClass -// EXPECTED: Ann(b1 = #99(c): Char, b2 = #99(c): Char, b3 = 99.toInt(): Int, b4 = 99.toLong(): Long, b5 = 99.toByte(): Byte, b6 = 99.toShort(): Short, b7 = 99.0.toDouble(): Double, b8 = 99.0.toFloat(): Float) \ No newline at end of file +// EXPECTED: Ann(b1 = #99(c): Char, b2 = #99(c): Char, b3 = 99: Int, b4 = 99.toLong(): Long, b5 = 99.toByte(): Byte, b6 = 99.toShort(): Short, b7 = 99.0.toDouble(): Double, b8 = 99.0.toFloat(): Float) \ No newline at end of file diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/compositeCallBinary.kt b/compiler/testData/resolveAnnotations/parameters/expressions/compositeCallBinary.kt index 7a7eb900ce2..4eb0bbb1f36 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/compositeCallBinary.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/compositeCallBinary.kt @@ -8,4 +8,4 @@ annotation class Ann( Ann(1.toInt().plus(1), 1.minus(1.toInt()), 1.toInt().times(1.toInt())) class MyClass -// EXPECTED: Ann(p1 = 2.toInt(): Int, p2 = 0.toInt(): Int, p3 = 1.toInt(): Int) +// EXPECTED: Ann(p1 = 2: Int, p2 = 0: Int, p3 = 1: Int) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/maxValue.kt b/compiler/testData/resolveAnnotations/parameters/expressions/maxValue.kt index 61b74bb2b88..934868533a2 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/maxValue.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/maxValue.kt @@ -18,4 +18,4 @@ Ann( p6 = java.lang.Long.MAX_VALUE + 1 ) class MyClass -// EXPECTED: Ann(p1 = 128.toInt(): Int, p2 = 32768.toInt(): Int, p3 = -2147483648.toInt(): Int, p4 = -2147483648.toInt(): Int, p5 = 2147483648.toLong(): Long, p6 = -9223372036854775808.toLong(): Long) +// EXPECTED: Ann(p1 = 128: Int, p2 = 32768: Int, p3 = -2147483648: Int, p4 = -2147483648: Int, p5 = 2147483648.toLong(): Long, p6 = -9223372036854775808.toLong(): Long) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/maxValueByte.kt b/compiler/testData/resolveAnnotations/parameters/expressions/maxValueByte.kt index 429a82e85d6..f8f15fb686e 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/maxValueByte.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/maxValueByte.kt @@ -16,4 +16,4 @@ Ann( p5 = 1.toByte() + 1.toByte() ) class MyClass -// EXPECTED: Ann(p1 = 128.toInt(): Int, p2 = IntegerValueType(2): IntegerValueType(2), p3 = 128.toInt(): Int, p4 = 2.toInt(): Int, p5 = 2.toInt(): Int) +// EXPECTED: Ann(p1 = 128: Int, p2 = IntegerValueType(2): IntegerValueType(2), p3 = 128: Int, p4 = 2: Int, p5 = 2: Int) diff --git a/compiler/testData/resolveAnnotations/parameters/expressions/maxValueInt.kt b/compiler/testData/resolveAnnotations/parameters/expressions/maxValueInt.kt index 748cffc8dff..0a0402ae2a1 100644 --- a/compiler/testData/resolveAnnotations/parameters/expressions/maxValueInt.kt +++ b/compiler/testData/resolveAnnotations/parameters/expressions/maxValueInt.kt @@ -16,4 +16,4 @@ Ann( p5 = 1.toInt() + 1.toInt() ) class MyClass -// EXPECTED: Ann(p1 = -2147483648.toInt(): Int, p2 = IntegerValueType(2): IntegerValueType(2), p3 = -2147483648.toInt(): Int, p4 = 2.toInt(): Int, p5 = 2.toInt(): Int) +// EXPECTED: Ann(p1 = -2147483648: Int, p2 = IntegerValueType(2): IntegerValueType(2), p3 = -2147483648: Int, p4 = 2: Int, p5 = 2: Int) diff --git a/compiler/testData/resolveAnnotations/parameters/int.kt b/compiler/testData/resolveAnnotations/parameters/int.kt index 0f5646558c7..7f143c5a1a4 100644 --- a/compiler/testData/resolveAnnotations/parameters/int.kt +++ b/compiler/testData/resolveAnnotations/parameters/int.kt @@ -9,4 +9,4 @@ annotation class Ann( Ann(1, 1.toInt(), 2147483648.toInt(), 2147483648) class MyClass -// EXPECTED: Ann(b1 = IntegerValueType(1): IntegerValueType(1), b2 = 1.toInt(): Int, b3 = -2147483648.toInt(): Int, b4 = IntegerValueType(2147483648): IntegerValueType(2147483648)) \ No newline at end of file +// EXPECTED: Ann(b1 = IntegerValueType(1): IntegerValueType(1), b2 = 1: Int, b3 = -2147483648: Int, b4 = IntegerValueType(2147483648): IntegerValueType(2147483648)) \ No newline at end of file diff --git a/core/descriptors/src/org/jetbrains/jet/lang/resolve/constants/IntValue.java b/core/descriptors/src/org/jetbrains/jet/lang/resolve/constants/IntValue.java index a5101819891..0f411c4bbda 100644 --- a/core/descriptors/src/org/jetbrains/jet/lang/resolve/constants/IntValue.java +++ b/core/descriptors/src/org/jetbrains/jet/lang/resolve/constants/IntValue.java @@ -40,7 +40,7 @@ public class IntValue extends IntegerValueConstant { @Override public String toString() { - return value + ".toInt()"; + return value.toString(); } @Override