Value classes: Allow unsigned arrays in annotations

including varargs, apparently.
So, we allow unsigned types and unsigned arrays in annotations,
but disallow user-defined inline classes.
 #KT-23816 Fixed
This commit is contained in:
Ilmir Usmanov
2020-12-02 20:14:43 +01:00
parent a9c072f826
commit 516fce37db
16 changed files with 229 additions and 8 deletions
@@ -0,0 +1,19 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
annotation class Ann(
val u: UInt,
val uba: UByteArray,
val usa: UShortArray,
val uia: UIntArray,
val ula: ULongArray
)
@Ann(
1u,
[1u],
ushortArrayOf(),
[1u, 1u],
ulongArrayOf(1u, 1u)
)
fun foo() {}
@@ -0,0 +1,16 @@
@java.lang.annotation.Retention
@kotlin.Metadata
public annotation class Ann {
// source: 'annotationGetters.kt'
public abstract method u(): int
public abstract method uba(): byte[]
public abstract method uia(): int[]
public abstract method ula(): long[]
public abstract method usa(): short[]
}
@kotlin.Metadata
public final class AnnotationGettersKt {
// source: 'annotationGetters.kt'
public final static @Ann method foo(): void
}