mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 08:31:29 +00:00
Delete the old ones in package kotlin.reflect.jvm because otherwise the code using those functions will become red in a lot less meaningful way (overload resolution ambiguity) than if they're deleted (unresolved import) Based on the work originally done by @dnpetrov #KT-8380 Fixed
20 lines
466 B
Kotlin
Vendored
20 lines
466 B
Kotlin
Vendored
import kotlin.reflect.*
|
|
|
|
class A {
|
|
var String.id: String
|
|
get() = this
|
|
set(value) {}
|
|
|
|
fun Int.foo(): Double = toDouble()
|
|
}
|
|
|
|
fun box(): String {
|
|
val p = javaClass<A>().kotlin.memberExtensionProperties.single()
|
|
return if ("$p" == "var A.(kotlin.String.)id") "OK" else "Fail $p"
|
|
|
|
val q = javaClass<A>().kotlin.declaredFunctions.single()
|
|
if ("$q" != "fun A.(kotlin.Int.)foo(): kotlin.Double") return "Fail q $q"
|
|
|
|
return "OK"
|
|
}
|