Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/kt10136.kt
T
Dmitry Petrov db42941586 Allow annotation constructor calls
in default parameter value expressions of anonymous classes
(if it is not a compile-time constant, it will be reported separately).

 #KT-10136 Fixed
2015-11-25 18:06:08 +03:00

8 lines
226 B
Kotlin
Vendored

annotation class A
annotation class A1(val x: Int)
annotation class B(
val a: A = A(),
val x: Int = <!ANNOTATION_PARAMETER_DEFAULT_VALUE_MUST_BE_CONSTANT!>A1(42).x<!>,
val aa: Array<A> = arrayOf(A())
)