Merge ConstantExpressionEvaluator and CompileTimeConstantResolver

This commit is contained in:
Natalia Ukhorskaya
2013-11-22 16:13:26 +04:00
parent e6923ba29e
commit d63f6843c8
55 changed files with 296 additions and 355 deletions
@@ -10,6 +10,6 @@ annotation class Ann(
val b7: Char
)
Ann(-1, -1, -1, -1, -1.0, -1.0, -'c') class MyClass
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.toDouble(): jet.Double, b7 = -99.toInt(): jet.Int]
// 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]
@@ -10,6 +10,6 @@ annotation class Ann(
val b7: Char
)
Ann(+1, +1, +1, +1, +1.0, +1.0, +'c') class MyClass
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.toDouble(): jet.Double, b7 = 99.toInt(): jet.Int]
// 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]
@@ -2,11 +2,9 @@ package test
annotation class Ann(
val b1: Float,
val b2: Float,
val b3: Float,
val b4: Float
val b2: Float
)
Ann(1.0, 1.toFloat(), 1.0.toFloat()) class MyClass
Ann(1.toFloat(), 1.0.toFloat()) class MyClass
// EXPECTED: Ann[b1 = 1.0.toFloat(): jet.Float, b2 = 1.0.toFloat(): jet.Float, b3 = 1.0.toFloat(): jet.Float]
// EXPECTED: Ann[b1 = 1.0.toFloat(): jet.Float, b2 = 1.0.toFloat(): jet.Float]