Files
kotlin-fork/js/js.translator/testData/box/expression/function/overloadOverridenFun.kt
T
Alexey Andreev 3b3fd0fa0d JS: fix DCE limits in test data to fit new kotlin.js size
The size has increased due to new implementation of KClass
2017-10-06 18:16:51 +03:00

23 lines
454 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1120
// KT-2219 if function overload overridden function its name doesn't translated correctly
package foo
interface I {
fun test(): String
}
class P : I {
override fun test(): String = "foo" + test("bar")
private fun test(p: String) = p
fun test(s: String, i: Int) = "$i $s"
}
fun box(): String {
assertEquals("foobar", P().test())
assertEquals("35 baz", P().test("baz", 35))
return "OK"
}