[K/JS] Use only single variant of default arguments function wrapper for exported and not-exported functions
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// EXPECTED_REACHABLE_NODES: 1299
|
||||
package foo
|
||||
|
||||
interface A {
|
||||
open fun foo(x: Int = 20, y: Int = 3) = x + y
|
||||
}
|
||||
|
||||
open class B : A {
|
||||
override fun foo(x: Int, y: Int) = 0
|
||||
fun bar1() = super.foo()
|
||||
|
||||
fun bar2() = super.foo(30)
|
||||
|
||||
fun bar3() = super.foo(y = 4)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val v1 = B().bar1()
|
||||
if (v1 != 23) return "fail1: $v1"
|
||||
|
||||
val v2 = B().bar2()
|
||||
if (v2 != 33) return "fail2: $v2"
|
||||
|
||||
val v3 = B().bar3()
|
||||
if (v3 != 24) return "fail3: $v3"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user