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,23 @@
// !DIAGNOSTICS: -EXPERIMENTAL_API_USAGE
// !API_VERSION: 1.3
// !JVM_TARGET: 1.8
abstract class A {
<!JVM_DEFAULT_NOT_IN_INTERFACE!>@kotlin.annotations.JvmDefault<!>
fun test() {}
<!JVM_DEFAULT_NOT_IN_INTERFACE!>@kotlin.annotations.JvmDefault<!>
abstract fun test2(s: String = "")
<!JVM_DEFAULT_NOT_IN_INTERFACE!>@kotlin.annotations.JvmDefault<!>
abstract fun test3()
}
object B {
<!JVM_DEFAULT_NOT_IN_INTERFACE!>@kotlin.annotations.JvmDefault<!>
fun test() {}
<!JVM_DEFAULT_NOT_IN_INTERFACE!>@kotlin.annotations.JvmDefault<!>
fun test2(<!UNUSED_PARAMETER!>s<!>: String = "") {}
}