JS: fix copying fun with default args from interface to abstract class
See KT-20451
This commit is contained in:
Vendored
+17
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user