Files
kotlin-fork/compiler/testData/diagnostics/tests/delegation/covariantOverrides/irrelevant.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

20 lines
367 B
Kotlin
Vendored

interface IBase1 {
fun foo(): Any
}
interface IDerived1 {
fun foo(): String
}
<!RETURN_TYPE_MISMATCH_ON_INHERITANCE!>class Broken1<!>(val b: IBase1) : IBase1 by b, IDerived1
interface IBase2 {
val foo: Any
}
interface IDerived2 {
val foo: String
}
<!PROPERTY_TYPE_MISMATCH_ON_INHERITANCE!>class Broken2<!>(val b: IBase2) : IBase2 by b, IDerived2