Additional tests for integer literal type promotion.

This commit is contained in:
Dmitry Petrov
2016-09-06 17:30:13 +03:00
committed by Dmitry Petrov
parent 0c0dac4822
commit c0ac607a1d
2 changed files with 18 additions and 1 deletions
+6 -1
View File
@@ -10,4 +10,9 @@ val test9 = 1.0
val test10 = -1.0
val test11 = 1.0f
val test12 = -1.0f
val test13 = 'a'
val test13 = 'a'
val testB: Byte = 1
val testS: Short = 1
val testI: Int = 1
val testL: Long = 1
+12
View File
@@ -38,3 +38,15 @@ FILE /literals.kt
PROPERTY public val test13: kotlin.Char = \u0061 ('a')
EXPRESSION_BODY
CONST Char type=kotlin.Char value='a'
PROPERTY public val testB: kotlin.Byte = 1.toByte()
EXPRESSION_BODY
CONST Byte type=kotlin.Byte value='1'
PROPERTY public val testS: kotlin.Short = 1.toShort()
EXPRESSION_BODY
CONST Short type=kotlin.Short value='1'
PROPERTY public val testI: kotlin.Int = 1
EXPRESSION_BODY
CONST Int type=kotlin.Int value='1'
PROPERTY public val testL: kotlin.Long = 1.toLong()
EXPRESSION_BODY
CONST Long type=kotlin.Long value='1'