Always use default 1.6 build target unless of 'jvm-target' option
This commit is contained in:
-1
@@ -12,7 +12,6 @@ where advanced options include:
|
||||
-Xadd-compiler-builtins Add definitions of built-in declarations to the compilation classpath (useful with -no-stdlib)
|
||||
-Xload-builtins-from-dependencies
|
||||
Load definitions of built-in declarations from module dependencies, instead of from the compiler
|
||||
-Xinterface-compatibility Generate DefaultImpls classes for interfaces in JVM target bytecode version 1.8 for binary compatibility with 1.6
|
||||
-Xno-inline Disable method inlining
|
||||
-Xrepeat <count> Repeat compilation (for performance analysis)
|
||||
-Xplugin <path> Load plugins from the given classpath
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
$TESTDATA_DIR$/jvm8Target.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-jvm-target
|
||||
1.8
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
interface A {
|
||||
fun test() = "OK"
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
println(object : A {}.test())
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
warning: the -jvm-target option has no effect yet
|
||||
OK
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
interface Z2 : Z {
|
||||
|
||||
}
|
||||
|
||||
class Z2Class : Z {
|
||||
override fun test() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
}
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/target6Inheritance/main.kt:1:1: error: compiling 'Z2' to JVM 1.8, but its superinterface 'Z' was compiled for JVM 1.6. Method implementation inheritance is restricted for such cases. Please make explicit overrides (abstract or concrete) for the following non-abstract members of 'Z':
|
||||
val z: String
|
||||
fun test(): Unit
|
||||
interface Z2 : Z {
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/target6Inheritance/main.kt:5:1: error: compiling 'Z2Class' to JVM 1.8, but its superinterface 'Z' was compiled for JVM 1.6. Method implementation inheritance is restricted for such cases. Please make explicit overrides (abstract or concrete) for the following non-abstract members of 'Z':
|
||||
val z: String
|
||||
class Z2Class : Z {
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
interface Z {
|
||||
|
||||
fun test() {
|
||||
|
||||
}
|
||||
|
||||
val z: String
|
||||
get() = "OK"
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
interface Z3 : Z, Z2 {
|
||||
|
||||
}
|
||||
|
||||
class Z3Class : Z, Z2 {
|
||||
override fun test() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/target6MultiInheritance/main.kt:1:1: error: compiling 'Z3' to JVM 1.8, but its superinterface 'Z' was compiled for JVM 1.6. Method implementation inheritance is restricted for such cases. Please make explicit overrides (abstract or concrete) for the following non-abstract members of 'Z':
|
||||
fun test(): Unit
|
||||
interface Z3 : Z, Z2 {
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/target6MultiInheritance/main.kt:1:1: error: compiling 'Z3' to JVM 1.8, but its superinterface 'Z2' was compiled for JVM 1.6. Method implementation inheritance is restricted for such cases. Please make explicit overrides (abstract or concrete) for the following non-abstract members of 'Z2':
|
||||
val z: String
|
||||
interface Z3 : Z, Z2 {
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/target6MultiInheritance/main.kt:5:1: error: compiling 'Z3Class' to JVM 1.8, but its superinterface 'Z2' was compiled for JVM 1.6. Method implementation inheritance is restricted for such cases. Please make explicit overrides (abstract or concrete) for the following non-abstract members of 'Z2':
|
||||
val z: String
|
||||
class Z3Class : Z, Z2 {
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
interface Z {
|
||||
|
||||
fun test() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
interface Z2 {
|
||||
|
||||
val z: String
|
||||
get() = "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user