Added error diagnostic on inheriting target 6 interface
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
interface Z2 : Z {
|
||||
|
||||
}
|
||||
|
||||
class Z2Class : Z {
|
||||
override fun test() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
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
@@ -0,0 +1,9 @@
|
||||
interface Z {
|
||||
|
||||
fun test() {
|
||||
|
||||
}
|
||||
|
||||
val z: String
|
||||
get() = "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user