Support primitive array annotation arguments in ConstantValueFactory

This has no visible consequences at the moment, but will help once we
need to load such argument from some annotation in the compiler in the
future
This commit is contained in:
Alexander Udalov
2017-06-22 18:55:55 +03:00
parent b67542533b
commit e42b151561
8 changed files with 91 additions and 6 deletions
@@ -0,0 +1,24 @@
package test
annotation class Anno(
val bytes: ByteArray,
val shorts: ShortArray,
val ints: IntArray,
val longs: LongArray,
val chars: CharArray,
val floats: FloatArray,
val doubles: DoubleArray,
val booleans: BooleanArray
)
@Anno(
byteArrayOf(42.toByte(), (-1).toByte()),
shortArrayOf((-42).toShort(), 0.toShort()),
intArrayOf(42, 239),
longArrayOf(42L, 239L),
charArrayOf('a', 'Z'),
floatArrayOf(2.72f, 0.0f),
doubleArrayOf(42.0, -3.14),
booleanArrayOf(true, false)
)
class Klass