Restore support for local class literals in annotation arguments

This was broken in c1ab08c8ce where we started to represent KClassValue
as a ClassId of the referenced class + number of times it's been wrapped
into kotlin.Array. Local classes do not have a sane ClassId, so in this
change we restore the old behavior by representing KClassValue with a
sealed class value instead

 #KT-29891 Fixed
This commit is contained in:
Alexander Udalov
2019-02-19 19:31:44 +01:00
parent f733bda912
commit 3f1533c35b
14 changed files with 132 additions and 35 deletions
@@ -2,4 +2,4 @@ import kotlin.reflect.KClass
annotation class Ann(val value: KClass<*>)
@Ann(<error descr="[ANNOTATION_ARGUMENT_MUST_BE_KCLASS_LITERAL] An annotation argument must be a class literal (T::class)">Array<<error descr="[UNRESOLVED_REFERENCE] Unresolved reference: String123">String123</error>>::class</error>) class A
@Ann(Array<<error descr="[UNRESOLVED_REFERENCE] Unresolved reference: String123">String123</error>>::class) class A