Files
kotlin-fork/compiler/testData/codegen/defaultArguments/blackBox/function/funInTrait.kt
T
2012-12-27 12:29:09 +04:00

14 lines
274 B
Kotlin

trait Foo {
fun foo(a: Double = 1.0): Double
}
class FooImpl : Foo {
override fun foo(a: Double): Double {
return a
}
}
fun box(): String {
if (FooImpl().foo() != 1.0) return "fail"
if (FooImpl().foo(2.0) != 2.0) return "fail"
return "OK"
}