[FIR] Implement Int -> Long conversions for literals and operators over them
^KT-38895 ^KT-50996 Fixed ^KT-51000 Fixed ^KT-51003 Fixed ^KT-51018 Fixed
This commit is contained in:
committed by
teamcity
parent
cc86ca2a0f
commit
52b72a7dac
@@ -0,0 +1,13 @@
|
||||
// LANGUAGE: +ApproximateIntegerLiteralTypesInReceiverPosition
|
||||
val p1: Byte = <!TYPE_MISMATCH!>(1 + 2) * 2<!>
|
||||
val p2: Short = <!TYPE_MISMATCH!>(1 + 2) * 2<!>
|
||||
val p3: Int = (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 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
|
||||
Reference in New Issue
Block a user