Support constant evaluation of unsigned type constructors

#KT-23816 In Progress
This commit is contained in:
Mikhail Zarechenskiy
2018-05-21 17:30:30 +03:00
parent bf5f710f39
commit 656f6cbded
24 changed files with 569 additions and 11 deletions
@@ -123,6 +123,26 @@ class AnnotationSerializer(private val stringTable: DescriptorAwareStringTable)
type = Type.STRING
stringValue = stringTable.getStringIndex(value.value)
}
override fun visitUByteValue(value: UByteValue, data: Unit?) {
type = Type.BYTE
intValue = value.value.toLong()
}
override fun visitUShortValue(value: UShortValue, data: Unit?) {
type = Type.SHORT
intValue = value.value.toLong()
}
override fun visitUIntValue(value: UIntValue, data: Unit?) {
type = Type.INT
intValue = value.value.toLong()
}
override fun visitULongValue(value: ULongValue, data: Unit?) {
type = Type.LONG
intValue = value.value
}
}, Unit)
}
}