[JS IR] Do not copy prototype references of FO from super class
Reduce bundle size from issue from 4.9M to 3.4M - fix KT-41227 - add simple test
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
// EXPECTED_REACHABLE_NODES: 1251
|
||||
|
||||
// KT-41227
|
||||
|
||||
var result = ""
|
||||
|
||||
open class A {
|
||||
@JsName("foo")
|
||||
fun foo() { result += "A" }
|
||||
@JsName("boo")
|
||||
open fun boo() { result += "FAIL" }
|
||||
}
|
||||
|
||||
class B : A() {
|
||||
override fun boo() { result += "B" }
|
||||
@JsName("bar")
|
||||
fun bar() { result += "C" }
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val b = B()
|
||||
b.boo()
|
||||
b.foo()
|
||||
b.bar()
|
||||
if (result != "BAC") return "FAIL: $result"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// PROPERTY_WRITE_COUNT: name=foo count=1
|
||||
// PROPERTY_WRITE_COUNT: name=boo count=2
|
||||
// PROPERTY_WRITE_COUNT: name=bar count=1
|
||||
Reference in New Issue
Block a user