c313887641
1. ConstantValue * just holds some value and its type * implementations for concrete constants 2. CompileTimeConstant * is only produced by ConstantExpressionEvaluator * has additional flags (canBeUsedInAnnotation etc) * has two implementations TypedCompileTimeConstant containing a constant value and IntegerValueConstant which does not have exact type * can be converted to ConstantValue Adjustt usages to use ConstantValue if flags are not needed Add tests for some uncovered cases
14 lines
269 B
Kotlin
Vendored
14 lines
269 B
Kotlin
Vendored
package test
|
|
|
|
annotation class Ann(
|
|
val p1: Int,
|
|
val p2: Int,
|
|
val p3: Int,
|
|
val p4: Int,
|
|
val p5: Int
|
|
)
|
|
|
|
Ann(1 plus 1, 1 minus 1, 1 times 1, 1 div 1, 1 mod 1) class MyClass
|
|
|
|
// EXPECTED: Ann(p1 = 2, p2 = 0, p3 = 1, p4 = 1, p5 = 0)
|