Treat number with unsigned literal as UByte & UShort & UInt & ULong

This commit is contained in:
Mikhail Zarechenskiy
2018-05-28 10:54:09 +03:00
parent 656f6cbded
commit 7d5fdb660d
15 changed files with 217 additions and 75 deletions
@@ -29,7 +29,7 @@ class JavaPropertyInitializerEvaluatorImpl : JavaPropertyInitializerEvaluator {
//Note: evaluated expression may be of class that does not match field type in some cases
// tested for Int, left other checks just in case
is Byte, is Short, is Int, is Long -> {
ConstantValueFactory.createIntegerConstantValue((evaluated as Number).toLong(), descriptor.type)
ConstantValueFactory.createIntegerConstantValue((evaluated as Number).toLong(), descriptor.type, false)
}
else -> {
ConstantValueFactory.createConstantValue(evaluated)