Remove error on annotated types as arguments to typeOf

Instead, document that `KType.annotations` returns an empty list for
types created with `typeOf`. Annotations might be supported in the
future.

 #KT-49573 Fixed
 #KT-29919
This commit is contained in:
Alexander Udalov
2021-11-11 18:10:20 +01:00
parent 2aa027639c
commit 850d76f6bf
18 changed files with 180 additions and 134 deletions
@@ -7,6 +7,9 @@ package kotlin.reflect
/**
* Returns a runtime representation of the given reified type [T] as an instance of [KType].
*
* Note that on JVM, the created type has no annotations ([KType.annotations] returns an empty list)
* even if the type in the source code is annotated. Support for type annotations might be added in a future version.
*/
@SinceKotlin("1.6")
@WasExperimental(ExperimentalStdlibApi::class)