Use type from compile time value for prefix expression
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package test
|
||||
|
||||
annotation class Ann(i: Int)
|
||||
annotation class Ann(i: Double)
|
||||
|
||||
Ann(@A 1) class MyClass
|
||||
Ann(@A 1.0) class MyClass
|
||||
|
||||
// EXPECTED: Ann[i = 1.toInt(): jet.Int]
|
||||
// EXPECTED: Ann[i = 1.0.toDouble(): jet.Double]
|
||||
|
||||
@@ -16,4 +16,4 @@ Ann(
|
||||
p5 = 1.toByte() + 1.toByte()
|
||||
) class MyClass
|
||||
|
||||
// EXPECTED: Ann[p1 = 128.toInt(): jet.Int, p2 = 2.toByte(): jet.Byte, p3 = 128.toInt(): jet.Int, p4 = 2.toInt(): jet.Int, p5 = 2.toByte(): jet.Byte]
|
||||
// EXPECTED: Ann[p1 = 128.toInt(): jet.Int, p2 = 2.toByte(): jet.Byte, p3 = 128.toInt(): jet.Int, p4 = 2.toInt(): jet.Int, p5 = 2.toInt(): jet.Int]
|
||||
|
||||
@@ -16,4 +16,4 @@ Ann(
|
||||
p5 = 1.toInt() + 1.toInt()
|
||||
) class MyClass
|
||||
|
||||
// EXPECTED: Ann[p1 = -2147483648.toInt(): jet.Int, p2 = 2.toInt(): jet.Int, p3 = -2147483648.toLong(): jet.Long, p4 = 2.toLong(): jet.Long, p5 = 2.toInt(): jet.Int]
|
||||
// EXPECTED: Ann[p1 = -2147483648.toInt(): jet.Int, p2 = 2.toInt(): jet.Int, p3 = -2147483648.toLong(): jet.Long, p4 = 2.toInt(): jet.Int, p5 = 2.toInt(): jet.Int]
|
||||
|
||||
@@ -12,4 +12,4 @@ annotation class Ann(
|
||||
|
||||
Ann(-1, -1, -1, -1, -1.0, -1.0.toFloat(), -'c') class MyClass
|
||||
|
||||
// EXPECTED: Ann[b1 = -1.toByte(): jet.Byte, b2 = -1.toShort(): jet.Short, b3 = -1.toInt(): jet.Int, b4 = -1.toLong(): jet.Long, b5 = -1.0.toDouble(): jet.Double, b6 = -1.0.toFloat(): jet.Float, b7 = -99.toInt(): jet.Int]
|
||||
// EXPECTED: Ann[b1 = IntegerValueType(-1): IntegerValueType(-1), b2 = IntegerValueType(-1): IntegerValueType(-1), b3 = IntegerValueType(-1): IntegerValueType(-1), b4 = IntegerValueType(-1): IntegerValueType(-1), b5 = -1.0.toDouble(): jet.Double, b6 = -1.0.toFloat(): jet.Float, b7 = IntegerValueType(-99): IntegerValueType(-99)]
|
||||
|
||||
@@ -12,4 +12,4 @@ annotation class Ann(
|
||||
|
||||
Ann(+1, +1, +1, +1, +1.0, +1.0.toFloat(), +'c') class MyClass
|
||||
|
||||
// EXPECTED: Ann[b1 = 1.toByte(): jet.Byte, b2 = 1.toShort(): jet.Short, b3 = 1.toInt(): jet.Int, b4 = 1.toLong(): jet.Long, b5 = 1.0.toDouble(): jet.Double, b6 = 1.0.toFloat(): jet.Float, b7 = 99.toInt(): jet.Int]
|
||||
// EXPECTED: Ann[b1 = IntegerValueType(1): IntegerValueType(1), b2 = IntegerValueType(1): IntegerValueType(1), b3 = IntegerValueType(1): IntegerValueType(1), b4 = IntegerValueType(1): IntegerValueType(1), b5 = 1.0.toDouble(): jet.Double, b6 = 1.0.toFloat(): jet.Float, b7 = IntegerValueType(99): IntegerValueType(99)]
|
||||
|
||||
Reference in New Issue
Block a user