Added error diagnostic on inheriting target 6 interface

This commit is contained in:
Michael Bogdanov
2016-09-28 12:11:29 +03:00
parent 7a5c211e8b
commit 95a1c254e1
21 changed files with 217 additions and 144 deletions
@@ -0,0 +1,14 @@
interface Z3 : Z, Z2 {
}
class Z3Class : Z, Z2 {
override fun test() {
}
}
fun main(args: Array<String>) {
}
@@ -0,0 +1,13 @@
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
@@ -0,0 +1,13 @@
interface Z {
fun test() {
}
}
interface Z2 {
val z: String
get() = "OK"
}