mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 00:21:32 +00:00
Migrate boxWithJava tests to multi-file framework
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
// FILE: ExtendsKCWithT.java
|
||||
|
||||
public class ExtendsKCWithT extends KC {
|
||||
public static String bar() {
|
||||
return new ExtendsKCWithT().foo();
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: KC.kt
|
||||
|
||||
// KT-3407 Implementing (in Java) an abstract Kotlin class that implements a trait does not respect trait method definition
|
||||
|
||||
interface T {
|
||||
@@ -1,5 +0,0 @@
|
||||
public class ExtendsKCWithT extends KC {
|
||||
public static String bar() {
|
||||
return new ExtendsKCWithT().foo();
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,12 @@
|
||||
// FILE: MyInt.java
|
||||
|
||||
public interface MyInt {
|
||||
|
||||
String test();
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
interface A : MyInt {
|
||||
override public fun test(): String? {
|
||||
return "OK"
|
||||
@@ -8,4 +17,4 @@ class B: A
|
||||
|
||||
fun box() : String {
|
||||
return B().test()!!
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
public interface MyInt {
|
||||
|
||||
String test();
|
||||
}
|
||||
Reference in New Issue
Block a user