JS: fix copying fun with default args from interface to abstract class

See KT-20451
This commit is contained in:
Alexey Andreev
2017-09-26 16:20:07 +03:00
parent 676e5d2a88
commit 43c6f8b9b1
6 changed files with 47 additions and 3 deletions
@@ -0,0 +1,17 @@
interface I {
fun foo(x: Int = 23): String
}
abstract class Base : I
class C : Base(), I {
override fun foo(x: Int) = "C:$x"
}
fun box(): String {
val x: I = C()
val r = x.foo() + ";" + x.foo(42)
if (r != "C:23;C:42") return "fail: $r"
return "OK"
}