mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Move java 8 tests to java8 folder
This commit is contained in:
27
compiler/testData/codegen/java8/box/jvm8/kt6301.kt
vendored
Normal file
27
compiler/testData/codegen/java8/box/jvm8/kt6301.kt
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
// !LANGUAGE: +JvmStaticInInterface
|
||||
// WITH_RUNTIME
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// FILE: test.kt
|
||||
fun box(): String {
|
||||
return Java.test()
|
||||
}
|
||||
|
||||
interface Foo {
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun foo() = "O"
|
||||
|
||||
@JvmStatic
|
||||
var fooProp = ""
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Java.java
|
||||
public class Java {
|
||||
public static String test() {
|
||||
Foo.setFooProp("K");
|
||||
return Foo.foo() + Foo.getFooProp();
|
||||
}
|
||||
}
|
||||
27
compiler/testData/codegen/java8/box/jvm8/kt6301_2.kt
vendored
Normal file
27
compiler/testData/codegen/java8/box/jvm8/kt6301_2.kt
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
// !LANGUAGE: +JvmStaticInInterface
|
||||
// WITH_RUNTIME
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// FILE: test.kt
|
||||
fun box(): String {
|
||||
return Java.test()
|
||||
}
|
||||
|
||||
interface Foo {
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun foo() = "O"
|
||||
|
||||
|
||||
val fooProp = "K"
|
||||
@JvmStatic get
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Java.java
|
||||
public class Java {
|
||||
public static String test() {
|
||||
return Foo.foo() + Foo.getFooProp();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user