Files
kotlin-fork/compiler/testData/diagnostics/tests/evaluate/parentesized.kt
T
Dmitriy Novozhilov 3cffb33ab7 [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
2022-12-09 15:10:02 +00:00

13 lines
527 B
Kotlin
Vendored

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 = (1 + 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
val i1: Int = (1.toByte() + 2) * 2
val i2: Int = (1.toShort() + 2) * 2