Add @JvmDefault diagnostics

This commit is contained in:
Mikhael Bogdanov
2018-02-22 12:15:10 +01:00
parent 63afd37cdd
commit 1d3e57acee
23 changed files with 669 additions and 3 deletions
@@ -0,0 +1,32 @@
// !DIAGNOSTICS: -EXPERIMENTAL_API_USAGE
// !API_VERSION: 1.3
// !JVM_TARGET: 1.8
interface A {
@kotlin.annotations.JvmDefault
val test: String
get() = "OK"
}
interface Abstract : A {
<!JVM_DEFAULT_REQUIRED_FOR_OVERRIDE!>override val test: String<!>
}
interface ANonDefault {
val test: String
get() = "ANonDefault"
}
interface B: A {
<!JVM_DEFAULT_REQUIRED_FOR_OVERRIDE!>override val test: String<!>
get() = "B"
}
interface C: ANonDefault, A {
<!JVM_DEFAULT_REQUIRED_FOR_OVERRIDE!>override val test: String<!>
get() = "C"
}
interface D: A, ANonDefault {
<!JVM_DEFAULT_REQUIRED_FOR_OVERRIDE!>override val test: String<!>
get() = "C"
}