Added some new test for java8

This commit is contained in:
Michael Bogdanov
2015-05-12 17:38:08 +03:00
parent 37dfa58cd3
commit 3fbdf05921
10 changed files with 90 additions and 3 deletions
@@ -0,0 +1,5 @@
interface Simple extends KTrait {
default String test() {
return "simple";
}
}
@@ -0,0 +1,23 @@
trait KTrait {
fun test(): String {
return "base";
}
}
class Test : Simple {
fun bar(): String {
return super.test()
}
}
fun box(): String {
val test = Test().test()
if (test != "simple") return "fail $test"
val bar = Test().bar()
if (bar != "simple") return "fail 2 $bar"
return "OK"
}