Split CompileTimeConstant into two entities
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
This commit is contained in:
+1
-1
@@ -10,4 +10,4 @@ annotation class Ann(
|
||||
|
||||
Ann(1.plus(1), 1.minus(1), 1.times(1), 1.div(1), 1.mod(1)) class MyClass
|
||||
|
||||
// EXPECTED: Ann(p1 = IntegerValueType(2), p2 = IntegerValueType(0), p3 = IntegerValueType(1), p4 = IntegerValueType(1), p5 = IntegerValueType(0))
|
||||
// EXPECTED: Ann(p1 = 2, p2 = 0, p3 = 1, p4 = 1, p5 = 0)
|
||||
|
||||
Reference in New Issue
Block a user