Files
kotlin-fork/compiler/testData/diagnostics/tests/annotations/cycleInParameters_before.fir.kt
T
Dmitriy Novozhilov e9ac24dc33 [FE 1.0] Report errors on cycles in annotation parameter types
^KT-47932
^KT-50753 Fixed
2022-01-14 14:26:52 +03:00

15 lines
416 B
Kotlin
Vendored

// WITH_REFLECT
// LANGUAGE: -ProhibitCyclesInAnnotations
// ISSUE: KT-47932
import kotlin.reflect.KClass
annotation class X(val value: X) // error
annotation class Y(val value: Array<Y>) // error
annotation class Z1(val a: Z2, val b: Z2) // error
annotation class Z2(val value: Z1) // error
annotation class A(val x: KClass<A>) // OK
annotation class B(val x: KClass<B>) // OK
annotation class C(val b: B) // OK