Allow to use emptyArray in annotation as argument
#KT-14236 Fixed
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
annotation class Anno(val x: Array<String> = emptyArray())
|
||||
|
||||
@Anno fun test1() = 1
|
||||
@Anno(arrayOf("K")) fun test2() = 2
|
||||
|
||||
fun box(): String {
|
||||
return if (test1() + test2() == 3) "OK" else "Fail"
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
@java.lang.annotation.Retention
|
||||
@kotlin.Metadata
|
||||
public annotation class Anno {
|
||||
public abstract method x(): java.lang.String[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class AnnotationWithEmptyArrayKt {
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
public final static @Anno method test1(): int
|
||||
public final static @Anno method test2(): int
|
||||
}
|
||||
Reference in New Issue
Block a user