FIR IDE: type-aware constant conversion

This commit is contained in:
Jinseong Jeon
2021-09-13 11:00:41 -07:00
committed by Ilya Kirillov
parent 9e4f234941
commit 068e81570d
17 changed files with 141 additions and 4 deletions
@@ -0,0 +1 @@
val p : Byte = <expr>42</expr>
@@ -0,0 +1,3 @@
expression: 42
constant_value: KtSimpleConstantValue(constantValueKind=Byte, value=42)
constant: 42
@@ -0,0 +1 @@
val p : Double = <expr>3.14</expr>
@@ -0,0 +1,3 @@
expression: 3.14
constant_value: KtSimpleConstantValue(constantValueKind=Double, value=3.14)
constant: 3.14
@@ -0,0 +1 @@
val p = <expr>3.14f</expr>
@@ -0,0 +1,3 @@
expression: 3.14f
constant_value: KtSimpleConstantValue(constantValueKind=Float, value=3.14)
constant: 3.14
@@ -0,0 +1 @@
val p : Int = <expr>42</expr>
@@ -0,0 +1,3 @@
expression: 42
constant_value: KtSimpleConstantValue(constantValueKind=Int, value=42)
constant: 42
@@ -0,0 +1 @@
val p : Long = <expr>42</expr>
@@ -0,0 +1,3 @@
expression: 42
constant_value: KtSimpleConstantValue(constantValueKind=Long, value=42)
constant: 42
@@ -0,0 +1 @@
val p : UInt = <expr>42u</expr>
@@ -0,0 +1,3 @@
expression: 42u
constant_value: KtSimpleConstantValue(constantValueKind=UInt, value=42)
constant: 42