[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:
committed by
Space Team
parent
26ff806440
commit
3cffb33ab7
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
|
||||
fun fooInt(p: Int) = p
|
||||
fun fooLong(p: Long) = p
|
||||
fun fooByte(p: Byte) = p
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
|
||||
fun fooInt(p: Int) = p
|
||||
fun fooLong(p: Long) = p
|
||||
fun fooByte(p: Byte) = p
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +InlineClasses, -JvmInlineValueClasses -ApproximateIntegerLiteralTypesInReceiverPosition
|
||||
// !LANGUAGE: +InlineClasses, -JvmInlineValueClasses
|
||||
// SKIP_JAVAC
|
||||
// ALLOW_KOTLIN_PACKAGE
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +InlineClasses, -JvmInlineValueClasses -ApproximateIntegerLiteralTypesInReceiverPosition
|
||||
// !LANGUAGE: +InlineClasses, -JvmInlineValueClasses
|
||||
// SKIP_JAVAC
|
||||
// ALLOW_KOTLIN_PACKAGE
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
|
||||
fun fooInt(p: Int) = p
|
||||
fun fooLong(p: Long) = p
|
||||
fun fooByte(p: Byte) = p
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
|
||||
fun fooInt(p: Int) = p
|
||||
fun fooLong(p: Long) = p
|
||||
fun fooByte(p: Byte) = p
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
|
||||
fun fooInt(p: Int) = p
|
||||
fun fooLong(p: Long) = p
|
||||
fun fooByte(p: Byte) = p
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
|
||||
fun fooInt(p: Int) = p
|
||||
fun fooLong(p: Long) = p
|
||||
fun fooByte(p: Byte) = p
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
|
||||
fun fooInt(p: Int) = p
|
||||
fun fooLong(p: Long) = p
|
||||
fun fooByte(p: Byte) = p
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: -ApproximateIntegerLiteralTypesInReceiverPosition
|
||||
fun fooInt(p: Int) = p
|
||||
fun fooLong(p: Long) = p
|
||||
fun fooByte(p: Byte) = p
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// LANGUAGE: +ApproximateIntegerLiteralTypesInReceiverPosition
|
||||
val p1: Byte = <!TYPE_MISMATCH!>(1 + 2) * 2<!>
|
||||
val p2: Short = <!TYPE_MISMATCH!>(1 + 2) * 2<!>
|
||||
val p3: Int = (1 + 2) * 2
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
// LANGUAGE: +ApproximateIntegerLiteralTypesInReceiverPosition
|
||||
val p1: Byte = <!TYPE_MISMATCH!>(1 + 2) * 2<!>
|
||||
val p2: Short = <!TYPE_MISMATCH!>(1 + 2) * 2<!>
|
||||
val p1: Byte = <!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>(1 + 2) * 2<!>
|
||||
val p2: Short = <!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>(1 + 2) * 2<!>
|
||||
val p3: Int = (1 + 2) * 2
|
||||
val p4: Long = <!TYPE_MISMATCH!>(1 + 2) * 2<!>
|
||||
val p4: Long = (1 + 2) * 2
|
||||
|
||||
val b1: Byte = <!TYPE_MISMATCH!>(1.toByte() + 2) * 2<!>
|
||||
val b2: Short = <!TYPE_MISMATCH!>(1.toShort() + 2) * 2<!>
|
||||
val b1: Byte = <!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE, TYPE_MISMATCH!>(1.toByte() + 2) * 2<!>
|
||||
val b2: Short = <!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE, TYPE_MISMATCH!>(1.toShort() + 2) * 2<!>
|
||||
val b3: Int = (1.toInt() + 2) * 2
|
||||
val b4: Long = (1.toLong() + 2) * 2
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ public val b3: kotlin.Int = 6
|
||||
public val b4: kotlin.Long = 6.toLong()
|
||||
public val i1: kotlin.Int = 6
|
||||
public val i2: kotlin.Int = 6
|
||||
public val p1: kotlin.Byte = 6
|
||||
public val p2: kotlin.Short = 6
|
||||
public val p1: kotlin.Byte = 6.toByte()
|
||||
public val p2: kotlin.Short = 6.toShort()
|
||||
public val p3: kotlin.Int = 6
|
||||
public val p4: kotlin.Long = 6
|
||||
public val p4: kotlin.Long = 6.toLong()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user