Files
kotlin-fork/js/js.translator/testData/box/inlineStdlib/callNameClash.kt
T
2018-09-12 09:49:25 +03:00

28 lines
464 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1295
package foo
// CHECK_NOT_CALLED: with_dbz3ex
fun f(x: Int): Int = x * 2
fun Int.f(): Int = this * 3
class A(var value: Int) {
companion object {
fun f(): Int = 5
}
fun f(): Int = value
}
fun test(a: A): Int =
// TODO: check that with second parameter is named f?
with (a) {
f(f() + A.f()).f()
}
fun box(): String {
assertEquals(90, test(A(10)))
return "OK"
}