mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
Added some new test for java8
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
interface Simple {
|
||||
default String test(String s) {
|
||||
return s + "K";
|
||||
}
|
||||
|
||||
static String testStatic(String s) {
|
||||
return s + "K";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
trait KTrait : Simple {
|
||||
fun bar(): String {
|
||||
return test("O") + Simple.testStatic("O")
|
||||
}
|
||||
}
|
||||
|
||||
class Test : KTrait {}
|
||||
|
||||
fun box(): String {
|
||||
val test = Test().bar()
|
||||
if (test != "OKOK") return "fail $test"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user