Files
kotlin-fork/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.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

24 lines
629 B
Kotlin
Vendored

// IGNORE_BACKEND_K2: ANY
// FIR status: KT-46419, ILT conversions to Byte and Short are not supported by design
val test1: Long = 42
val test2: Short = 42
val test3: Byte = 42
val test4: Long = 42.unaryMinus()
val test5: Short = 42.unaryMinus()
val test6: Byte = 42.unaryMinus()
fun test() {
val test1: Int? = 42
val test2: Long = 42
val test3: Long? = 42
val test4: Long? = -1
val test5: Long? = 1.unaryMinus()
val test6: Short? = 1.unaryMinus()
val test7: Byte? = 1.unaryMinus()
}
fun testImplicitArguments(x: Long = 1.unaryMinus()) {}
class TestImplicitArguments(val x: Long = 1.unaryMinus())