diff --git a/js/js.translator/testData/box/native/inheritanceInNativeClass.js b/js/js.translator/testData/box/native/inheritanceInNativeClass.js index ac0cb0ed686..d454fe0c948 100644 --- a/js/js.translator/testData/box/native/inheritanceInNativeClass.js +++ b/js/js.translator/testData/box/native/inheritanceInNativeClass.js @@ -1,8 +1,8 @@ function createA() { function ADerived() { } - ADerived.prototype = Object.create(JS_TESTS.foo.A.prototype); - ADerived.prototype.foo_za3lpa$ = function(n) { + ADerived.prototype = Object.create(JS_TESTS.A.prototype); + ADerived.prototype.foo = function(n) { return 24; }; return new ADerived(); @@ -11,9 +11,9 @@ function createA() { function createB() { function BDerived() { } - BDerived.prototype = Object.create(JS_TESTS.foo.B.prototype); - BDerived.prototype.bar_za3lpa$ = function(n) { - return this.foo_za3lpa$(n); + BDerived.prototype = Object.create(JS_TESTS.B.prototype); + BDerived.prototype.bar = function(n) { + return this.foo(n); }; return new BDerived(); } \ No newline at end of file diff --git a/js/js.translator/testData/box/native/inheritanceInNativeClass.kt b/js/js.translator/testData/box/native/inheritanceInNativeClass.kt index b9200b7075f..cf610f28af0 100644 --- a/js/js.translator/testData/box/native/inheritanceInNativeClass.kt +++ b/js/js.translator/testData/box/native/inheritanceInNativeClass.kt @@ -1,17 +1,19 @@ -// IGNORE_BACKEND: JS_IR // SKIP_MINIFICATION // Contains calls from external JS code -package foo open class A { + @JsName("foo") open protected fun foo(n: Int) = 23 + @JsName("bar") fun bar(n: Int) = foo(n) + 100 } open class B { + @JsName("foo") protected fun foo(n: Int) = 42 + @JsName("bar") open fun bar(n: Int) = 142 }