[FE] Drop ApproximateIntegerLiteralTypesInReceiverPosition language feature

This feature is not needed because it is unconditionally disabled for K1
  (because of not fully correct implementation) and unconditionally enabled
  in K2 (K2 does not support old behavior)

^KT-38895
This commit is contained in:
Dmitriy Novozhilov
2022-11-30 12:22:09 +02:00
committed by Space Team
parent 26ff806440
commit 3cffb33ab7
90 changed files with 90 additions and 494 deletions
@@ -1,7 +1,6 @@
// !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
// TARGET_BACKEND: JVM
// IGNORE_BACKEND_K2: JVM_IR, JS_IR
// FIR status: don't support legacy feature
// FIR status: KT-46419, ILT conversions to Byte and Short are not supported by design
// WITH_STDLIB
// This test exists only to check that we don't accidentally break the buggy behavior of the old JVM backend in JVM IR (KT-42321).
// Feel free to remove it as soon as there's no language version where such code is allowed (KT-38895).
+1 -2
View File
@@ -1,6 +1,5 @@
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
// IGNORE_BACKEND_K2: JVM_IR, JS_IR
// FIR status: don't support legacy feature; for reasons this test is ignored, go to KT-46419
// FIR status: KT-46419, ILT conversions to Byte and Short are not supported by design
fun box(): String {
val a1: Byte = 1.plus(1)
+1 -2
View File
@@ -1,6 +1,5 @@
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
// IGNORE_BACKEND_K2: JVM_IR, JS_IR
// FIR status: don't support legacy feature; for reasons this test is ignored, go to KT-46419
// FIR status: KT-46419, ILT conversions to Byte and Short are not supported by design
fun box(): String {
val a1: Byte? = 1.plus(1)
+1 -2
View File
@@ -1,6 +1,5 @@
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
// IGNORE_BACKEND_K2: JVM_IR, JS_IR
// FIR status: don't support legacy feature; for reasons this test is ignored, go to KT-46419
// FIR status: KT-46419, ILT conversions to Byte and Short are not supported by design
fun box(): String {
val a1: Byte = 1 + 1
@@ -1,6 +1,5 @@
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
// IGNORE_BACKEND_K2: JVM_IR, JS_IR
// FIR status: don't support legacy feature; for reasons this test is ignored, go to KT-46419
// FIR status: KT-46419, ILT conversions to Byte and Short are not supported by design
fun box(): String {
val a1: Byte? = 1 + 1
@@ -1,5 +1,3 @@
// LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
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"