e7e80be34a
Before this commit we considered !isOverride as a sign that function / field / accessor has no overridden symbols. However, it's false for deserialized, because isOverride is always false there. This commit fixes 68 BB tests but breaks 25 BB tests (not yet muted)
36 lines
713 B
Kotlin
Vendored
36 lines
713 B
Kotlin
Vendored
// IGNORE_BACKEND: JS_IR
|
|
// TODO: investigate should it be ran for JS or not
|
|
// IGNORE_BACKEND: JS, NATIVE
|
|
|
|
// WITH_REFLECT
|
|
|
|
import kotlin.reflect.*
|
|
import kotlin.test.*
|
|
|
|
class C {
|
|
fun foo() {}
|
|
var bar = "OK"
|
|
}
|
|
|
|
fun C.extFun(i: Int) {}
|
|
|
|
fun KParameter.check(name: String) {
|
|
assertEquals(name, this.name!!)
|
|
assertEquals(KParameter.Kind.VALUE, this.kind)
|
|
}
|
|
|
|
fun box(): String {
|
|
val cFoo = C()::foo
|
|
val cBar = C()::bar
|
|
val cExtFun = C()::extFun
|
|
|
|
assertEquals(0, cFoo.parameters.size)
|
|
assertEquals(0, cBar.getter.parameters.size)
|
|
assertEquals(1, cBar.setter.parameters.size)
|
|
|
|
assertEquals(1, cExtFun.parameters.size)
|
|
cExtFun.parameters[0].check("i")
|
|
|
|
return "OK"
|
|
}
|