add test for compile time constants without expicit type
This commit is contained in:
@@ -18,6 +18,9 @@ val doubleConst: Double = 3.0
|
|||||||
val enumConst: Weapon? = Weapon.ROCK
|
val enumConst: Weapon? = Weapon.ROCK
|
||||||
val arrayConst: Any = byteArray(1,2)
|
val arrayConst: Any = byteArray(1,2)
|
||||||
|
|
||||||
|
val a = 10
|
||||||
|
val b = a + 20
|
||||||
|
|
||||||
class Class {
|
class Class {
|
||||||
val byteConst: Byte = 10
|
val byteConst: Byte = 10
|
||||||
val shortConst: Short = 20
|
val shortConst: Short = 20
|
||||||
@@ -30,5 +33,7 @@ class Class {
|
|||||||
val doubleConst: Double = 3.0
|
val doubleConst: Double = 3.0
|
||||||
val enumConst: Weapon? = Weapon.ROCK
|
val enumConst: Weapon? = Weapon.ROCK
|
||||||
val arrayConst: Any = byteArray(1,2)
|
val arrayConst: Any = byteArray(1,2)
|
||||||
|
val a = 10
|
||||||
|
val b = a + 20
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package test
|
package test
|
||||||
|
|
||||||
|
internal val a: kotlin.Int = 10
|
||||||
internal val arrayConst: kotlin.Any = {1.toByte(), 2.toByte()}
|
internal val arrayConst: kotlin.Any = {1.toByte(), 2.toByte()}
|
||||||
|
internal val b: kotlin.Int = 30
|
||||||
internal val booleanConst: kotlin.Boolean = true
|
internal val booleanConst: kotlin.Boolean = true
|
||||||
internal val byteConst: kotlin.Byte = 10.toByte()
|
internal val byteConst: kotlin.Byte = 10.toByte()
|
||||||
internal val charConst: kotlin.Char = \u0041 ('A')
|
internal val charConst: kotlin.Char = \u0041 ('A')
|
||||||
@@ -14,7 +16,9 @@ internal val stringConst: kotlin.String = "abcd"
|
|||||||
|
|
||||||
internal final class Class {
|
internal final class Class {
|
||||||
public constructor Class()
|
public constructor Class()
|
||||||
|
internal final val a: kotlin.Int = 10
|
||||||
internal final val arrayConst: kotlin.Any = {1.toByte(), 2.toByte()}
|
internal final val arrayConst: kotlin.Any = {1.toByte(), 2.toByte()}
|
||||||
|
internal final val b: kotlin.Int = 30
|
||||||
internal final val booleanConst: kotlin.Boolean = true
|
internal final val booleanConst: kotlin.Boolean = true
|
||||||
internal final val byteConst: kotlin.Byte = 10.toByte()
|
internal final val byteConst: kotlin.Byte = 10.toByte()
|
||||||
internal final val charConst: kotlin.Char = \u0041 ('A')
|
internal final val charConst: kotlin.Char = \u0041 ('A')
|
||||||
|
|||||||
Reference in New Issue
Block a user