Refactor KClassValue to store ClassLiteralValue internally
Only invariant array projections and non-null element types will be supported soon (see KT-26568), so it makes no sense to store the complete type in KClassValue. What we need is only the ClassId of the class, and the number of times it's wrapped into kotlin/Array, which is exactly what ClassLiteralValue represents. This change helps in decoupling annotation values from descriptors/types. The only constant value that depends on descriptors is now AnnotationValue. #KT-26582 Fixed
This commit is contained in:
+2
-2
@@ -2,8 +2,8 @@ package
|
||||
|
||||
@Foo(a = {}) public fun test1(): kotlin.Unit
|
||||
@Foo(a = {kotlin.Int::class, kotlin.String::class}) public fun test2(): kotlin.Unit
|
||||
@Foo(a = {kotlin.Array<*>::class}) public fun test3(): kotlin.Unit
|
||||
@Foo(a = {Gen<kotlin.Int>::class}) public fun test4(): kotlin.Unit
|
||||
@Foo(a = {kotlin.Array<kotlin.Any>::class}) public fun test3(): kotlin.Unit
|
||||
@Foo(a = {Gen::class}) public fun test4(): kotlin.Unit
|
||||
@Foo(a = {""}) public fun test5(): kotlin.Unit
|
||||
@Foo(a = {kotlin.Int::class, 1}) public fun test6(): kotlin.Unit
|
||||
@Bar public fun test7(): kotlin.Unit
|
||||
|
||||
Reference in New Issue
Block a user