Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/generic.kt
T
Ilya Kirillov 1bbcae5ed2 [FIR] fix resolve contract violation from scopes
We cannot call lazy resolve to STATUS phase from scopes as scopes may be accessed on a STATUS phase or earlier

^KT-54890
^KTIJ-23587 fixed
2023-01-13 21:32:51 +00:00

62 lines
934 B
Kotlin
Vendored

// FIR_IDENTICAL
// !JVM_TARGET: 1.8
// !JVM_DEFAULT_MODE: enable
interface A<T> {
@<!DEPRECATION!>JvmDefault<!>
fun test(p: T) {
}
}
interface ANonDefault {
fun test(p: String) {}
}
interface B<T> : A<T> {
<!JVM_DEFAULT_REQUIRED_FOR_OVERRIDE!>override fun test(p: T)<!>
{}
}
interface C<T> : A<T>, ANonDefault {
<!JVM_DEFAULT_REQUIRED_FOR_OVERRIDE!>override fun test(p: T)<!>
{}
override fun test(p: String) {
}
}
interface C1 : C<String> {
override fun test(p: String) {
}
}
interface C2 : C<String>, ANonDefault {
override fun test(p: String) {
}
}
interface D<T> : ANonDefault, A<T> {
<!JVM_DEFAULT_REQUIRED_FOR_OVERRIDE!>override fun test(p: T)<!>
{}
override fun test(p: String) {
}
}
interface D1 : D<String> {
override fun test(p: String) {
}
}
interface D2 : ANonDefault, D<String> {
override fun test(p: String) {
}
}