[FE 1.0] Report errors on cycles in annotation parameter types
^KT-47932 ^KT-50753 Fixed
This commit is contained in:
committed by
teamcity
parent
139a800ff7
commit
e9ac24dc33
@@ -0,0 +1,15 @@
|
||||
// WITH_REFLECT
|
||||
// LANGUAGE: +ProhibitCyclesInAnnotations
|
||||
// ISSUE: KT-47932
|
||||
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
annotation class X(<!CYCLE_IN_ANNOTATION_PARAMETER_ERROR!>val value: X<!>) // error
|
||||
annotation class Y(<!CYCLE_IN_ANNOTATION_PARAMETER_ERROR!>val value: Array<Y><!>) // error
|
||||
|
||||
annotation class Z1(<!CYCLE_IN_ANNOTATION_PARAMETER_ERROR!>val a: Z2<!>, <!CYCLE_IN_ANNOTATION_PARAMETER_ERROR!>val b: Z2<!>) // error
|
||||
annotation class Z2(<!CYCLE_IN_ANNOTATION_PARAMETER_ERROR!>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
|
||||
Reference in New Issue
Block a user