Do not use qualifiedName property in KClass.cast function, because it's not supported in K/JS

Introduce an internal property that returns either qualified or simple name, and use it instead.
This commit is contained in:
Ilya Gorbunov
2019-12-27 17:03:43 +03:00
parent 43e08a5717
commit 3a78ab6d40
3 changed files with 22 additions and 1 deletions
@@ -0,0 +1,9 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package kotlin.reflect
internal actual inline val KClass<*>.qualifiedOrSimpleName: String?
get() = simpleName