diff --git a/compiler/testData/codegen/box/argumentOrder/defaults.kt b/compiler/testData/codegen/box/argumentOrder/defaults.kt index ebf9b4d7d19..859be08e80a 100644 --- a/compiler/testData/codegen/box/argumentOrder/defaults.kt +++ b/compiler/testData/codegen/box/argumentOrder/defaults.kt @@ -1,6 +1,6 @@ var invokeOrder: String = "" -fun test(x: Double = { invokeOrder += "x"; 1.0 }(), a: String, y: Long = { invokeOrder += "y"; 1 }(), b: String): String { +fun test(x: Double = { invokeOrder += "x"; 1.0 }(), a: String, y: Long = { invokeOrder += "y"; 1L }(), b: String): String { return "" + x.toInt() + a + b + y; } @@ -10,4 +10,4 @@ fun box(): String { if (invokeOrder != "KOxy" || funResult != "1OK1") return "fail: $invokeOrder != KOxy or $funResult != 1OK1" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/binaryOp/call.kt b/compiler/testData/codegen/box/binaryOp/call.kt index 0f3d0139001..93dc3c84bed 100644 --- a/compiler/testData/codegen/box/binaryOp/call.kt +++ b/compiler/testData/codegen/box/binaryOp/call.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND_FIR: JVM_IR + fun box(): String { val a1: Byte = 1.plus(1) val a2: Short = 1.plus(1) @@ -18,4 +20,4 @@ fun box(): String { if (a8 != 1) return "fail 8" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/binaryOp/callNullable.kt b/compiler/testData/codegen/box/binaryOp/callNullable.kt index 0167a38ed04..91094dba138 100644 --- a/compiler/testData/codegen/box/binaryOp/callNullable.kt +++ b/compiler/testData/codegen/box/binaryOp/callNullable.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND_FIR: JVM_IR + fun box(): String { val a1: Byte? = 1.plus(1) val a2: Short? = 1.plus(1) diff --git a/compiler/testData/codegen/box/binaryOp/intrinsic.kt b/compiler/testData/codegen/box/binaryOp/intrinsic.kt index 7434a7848e5..905894178eb 100644 --- a/compiler/testData/codegen/box/binaryOp/intrinsic.kt +++ b/compiler/testData/codegen/box/binaryOp/intrinsic.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND_FIR: JVM_IR + fun box(): String { val a1: Byte = 1 + 1 val a2: Short = 1 + 1 @@ -18,4 +20,4 @@ fun box(): String { if (a8 != 1) return "fail 8" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/binaryOp/intrinsicNullable.kt b/compiler/testData/codegen/box/binaryOp/intrinsicNullable.kt index fdfc98f3bb4..d58e92a449b 100644 --- a/compiler/testData/codegen/box/binaryOp/intrinsicNullable.kt +++ b/compiler/testData/codegen/box/binaryOp/intrinsicNullable.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND_FIR: JVM_IR + fun box(): String { val a1: Byte? = 1 + 1 val a2: Short? = 1 + 1 diff --git a/compiler/testData/codegen/box/binaryOp/overflowLong.kt b/compiler/testData/codegen/box/binaryOp/overflowLong.kt index 28d37ab1c12..a08bbb67e38 100644 --- a/compiler/testData/codegen/box/binaryOp/overflowLong.kt +++ b/compiler/testData/codegen/box/binaryOp/overflowLong.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND_FIR: JVM_IR + fun box(): String { val a: Long = 2147483647 + 1 if (a != -2147483648L) return "fail: in this case we should add to ints and than cast the result to long - overflow expected" @@ -11,4 +13,4 @@ fun box(): String { if (l4 < l3) return "fail: Long.MIN_VALUE - 1 should overflow to positive." return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/fullJdk/kt46540.kt b/compiler/testData/codegen/box/fullJdk/kt46540.kt index fd5311e19cc..8ee6266a52d 100644 --- a/compiler/testData/codegen/box/fullJdk/kt46540.kt +++ b/compiler/testData/codegen/box/fullJdk/kt46540.kt @@ -1,4 +1,5 @@ // TARGET_BACKEND: JVM +// IGNORE_BACKEND_FIR: JVM_IR // SKIP_JDK6 // FULL_JDK diff --git a/compiler/testData/codegen/box/unaryOp/call.kt b/compiler/testData/codegen/box/unaryOp/call.kt index fe138509d88..00eb8d5ad10 100644 --- a/compiler/testData/codegen/box/unaryOp/call.kt +++ b/compiler/testData/codegen/box/unaryOp/call.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND_FIR: JVM_IR + fun box(): String { val a1: Byte = 1.unaryMinus() val a2: Short = 1.unaryMinus() @@ -14,4 +16,4 @@ fun box(): String { if (a6 != -1f) return "fail 6" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/unaryOp/callNullable.kt b/compiler/testData/codegen/box/unaryOp/callNullable.kt index f3ff7db949a..a9245c0bfd3 100644 --- a/compiler/testData/codegen/box/unaryOp/callNullable.kt +++ b/compiler/testData/codegen/box/unaryOp/callNullable.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND_FIR: JVM_IR + fun box(): String { val a1: Byte? = 1.unaryMinus() val a2: Short? = 1.unaryMinus() diff --git a/compiler/testData/codegen/box/unaryOp/longOverflow.kt b/compiler/testData/codegen/box/unaryOp/longOverflow.kt index d3615f071ea..5a35c18534c 100644 --- a/compiler/testData/codegen/box/unaryOp/longOverflow.kt +++ b/compiler/testData/codegen/box/unaryOp/longOverflow.kt @@ -1,5 +1,7 @@ +// IGNORE_BACKEND_FIR: JVM_IR + fun box(): String { val a: Long = -(1 shl 31) if (a != -2147483648L) return "fail: in this case we should add to ints and than cast the result to long - overflow expected" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/bytecodeText/constants/byte.kt b/compiler/testData/codegen/bytecodeText/constants/byte.kt index 8809d08dbeb..d4c598f4653 100644 --- a/compiler/testData/codegen/bytecodeText/constants/byte.kt +++ b/compiler/testData/codegen/bytecodeText/constants/byte.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR val a: Byte = 1 + 10 -// 1 BIPUSH 11 \ No newline at end of file +// 1 BIPUSH 11 diff --git a/compiler/testData/codegen/bytecodeText/constants/short.kt b/compiler/testData/codegen/bytecodeText/constants/short.kt index bf041dae18e..1482c78e00c 100644 --- a/compiler/testData/codegen/bytecodeText/constants/short.kt +++ b/compiler/testData/codegen/bytecodeText/constants/short.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: JVM_IR val a: Short = 1 + 255 -// 1 SIPUSH 256 \ No newline at end of file +// 1 SIPUSH 256 diff --git a/compiler/testData/diagnostics/tests/evaluate/binaryMinusIndependentExpType.fir.kt b/compiler/testData/diagnostics/tests/evaluate/binaryMinusIndependentExpType.fir.kt index 2f524af2c1a..69a770e7cc5 100644 --- a/compiler/testData/diagnostics/tests/evaluate/binaryMinusIndependentExpType.fir.kt +++ b/compiler/testData/diagnostics/tests/evaluate/binaryMinusIndependentExpType.fir.kt @@ -1,24 +1,24 @@ val p1: Int = 1 - 1 -val p2: Long = 1 - 1 -val p3: Byte = 1 - 1 -val p4: Short = 1 - 1 +val p2: Long = 1 - 1 +val p3: Byte = 1 - 1 +val p4: Short = 1 - 1 val l1: Long = 1 - 1.toLong() -val l2: Byte = 1 - 1.toLong() -val l3: Int = 1 - 1.toLong() -val l4: Short = 1 - 1.toLong() +val l2: Byte = 1 - 1.toLong() +val l3: Int = 1 - 1.toLong() +val l4: Short = 1 - 1.toLong() -val b1: Byte = 1 - 1.toByte() +val b1: Byte = 1 - 1.toByte() val b2: Int = 1 - 1.toByte() -val b3: Long = 1 - 1.toByte() -val b4: Short = 1 - 1.toByte() +val b3: Long = 1 - 1.toByte() +val b4: Short = 1 - 1.toByte() -val i1: Byte = 1 - 1.toInt() +val i1: Byte = 1 - 1.toInt() val i2: Int = 1 - 1.toInt() -val i3: Long = 1 - 1.toInt() -val i4: Short = 1 - 1.toInt() +val i3: Long = 1 - 1.toInt() +val i4: Short = 1 - 1.toInt() -val s1: Byte = 1 - 1.toShort() +val s1: Byte = 1 - 1.toShort() val s2: Int = 1 - 1.toShort() -val s3: Long = 1 - 1.toShort() -val s4: Short = 1 - 1.toShort() +val s3: Long = 1 - 1.toShort() +val s4: Short = 1 - 1.toShort() diff --git a/compiler/testData/diagnostics/tests/evaluate/divisionByZero.fir.kt b/compiler/testData/diagnostics/tests/evaluate/divisionByZero.fir.kt index d29ce21387c..ba60714eeec 100644 --- a/compiler/testData/diagnostics/tests/evaluate/divisionByZero.fir.kt +++ b/compiler/testData/diagnostics/tests/evaluate/divisionByZero.fir.kt @@ -16,7 +16,7 @@ val a10 = 1 / 0.0f val a11 = 1 / 0.0 val a12 = 1L / 0 -val b1: Byte = 1 / 0 +val b1: Byte = 1 / 0 @Ann(1 / 0) val b2 = 1 annotation class Ann(val i : Int) diff --git a/compiler/testData/diagnostics/tests/evaluate/parentesized.fir.kt b/compiler/testData/diagnostics/tests/evaluate/parentesized.fir.kt index 1b35f47790b..eb7fa7afede 100644 --- a/compiler/testData/diagnostics/tests/evaluate/parentesized.fir.kt +++ b/compiler/testData/diagnostics/tests/evaluate/parentesized.fir.kt @@ -1,12 +1,12 @@ -val p1: Byte = (1 + 2) * 2 -val p2: Short = (1 + 2) * 2 +val p1: Byte = (1 + 2) * 2 +val p2: Short = (1 + 2) * 2 val p3: Int = (1 + 2) * 2 -val p4: Long = (1 + 2) * 2 +val p4: Long = (1 + 2) * 2 -val b1: Byte = (1.toByte() + 2) * 2 -val b2: Short = (1.toShort() + 2) * 2 +val b1: Byte = (1.toByte() + 2) * 2 +val b2: Short = (1.toShort() + 2) * 2 val b3: Int = (1.toInt() + 2) * 2 val b4: Long = (1.toLong() + 2) * 2 val i1: Int = (1.toByte() + 2) * 2 -val i2: Int = (1.toShort() + 2) * 2 \ No newline at end of file +val i2: Int = (1.toShort() + 2) * 2 diff --git a/compiler/testData/diagnostics/tests/evaluate/unaryMinusIndependentExpType.fir.kt b/compiler/testData/diagnostics/tests/evaluate/unaryMinusIndependentExpType.fir.kt index 3d17ec1adef..6dac0591615 100644 --- a/compiler/testData/diagnostics/tests/evaluate/unaryMinusIndependentExpType.fir.kt +++ b/compiler/testData/diagnostics/tests/evaluate/unaryMinusIndependentExpType.fir.kt @@ -9,21 +9,21 @@ val lp3: Byte = -1111111111111111111 val lp4: Short = -1111111111111111111 val l1: Long = -1.toLong() -val l2: Byte = -1.toLong() -val l3: Int = -1.toLong() -val l4: Short = -1.toLong() +val l2: Byte = -1.toLong() +val l3: Int = -1.toLong() +val l4: Short = -1.toLong() -val b1: Byte = -1.toByte() +val b1: Byte = -1.toByte() val b2: Int = -1.toByte() -val b3: Long = -1.toByte() -val b4: Short = -1.toByte() +val b3: Long = -1.toByte() +val b4: Short = -1.toByte() -val i1: Byte = -1.toInt() +val i1: Byte = -1.toInt() val i2: Int = -1.toInt() -val i3: Long = -1.toInt() -val i4: Short = -1.toInt() +val i3: Long = -1.toInt() +val i4: Short = -1.toInt() -val s1: Byte = -1.toShort() +val s1: Byte = -1.toShort() val s2: Int = -1.toShort() -val s3: Long = -1.toShort() -val s4: Short = -1.toShort() +val s3: Long = -1.toShort() +val s4: Short = -1.toShort() diff --git a/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.kt b/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.kt index 577b9732d72..345f96f99cd 100644 --- a/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.kt +++ b/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND_FIR: ANY val test1: Long = 42 val test2: Short = 42 val test3: Byte = 42 @@ -17,4 +18,4 @@ fun test() { fun testImplicitArguments(x: Long = 1.unaryMinus()) {} -class TestImplicitArguments(val x: Long = 1.unaryMinus()) \ No newline at end of file +class TestImplicitArguments(val x: Long = 1.unaryMinus()) diff --git a/jps-plugin/testData/incremental/pureKotlin/allConstants/fir-build.log b/jps-plugin/testData/incremental/pureKotlin/allConstants/fir-build.log new file mode 100644 index 00000000000..d9b0d1123e4 --- /dev/null +++ b/jps-plugin/testData/incremental/pureKotlin/allConstants/fir-build.log @@ -0,0 +1,19 @@ +================ Step #1 ================= + +Compiling files: + src/const.kt +End of files +Exit code: ABORT +------------------------------------------ +COMPILATION FAILED +Type mismatch: inferred type is kotlin/Int but kotlin/Byte was expected +Type mismatch: inferred type is kotlin/Int but kotlin/Short was expected + +================ Step #2 ================= + +Compiling files: + src/const.kt + src/usage.kt +End of files +Exit code: OK +