Files
kotlin-fork/js/js.translator/testData/box/expression/identifierClash/overloadedFun.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

22 lines
430 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1123
package foo
abstract class B {
abstract fun foo(param: String): String
}
class A : B() {
// must be here - before open fun foo(String)
private fun foo(param: Int) = "foo(Int)"
fun foo() = "foo()"
override fun foo(param: String) = "foo(String)"
}
fun box(): String {
val result = A().foo("OK")
if (result != "foo(String)") return "fail: $result"
return "OK"
}