Files
kotlin-fork/compiler/testData/diagnostics/tests/scopes/inheritance/methodsPriority.fir.kt
T
Denis.Zharkov 00821bbc63 FIR: Update test data (repeated diagnostics)
They are a bit redundant, but it needs additional work to be done
to avoid them
2021-05-20 17:24:33 +03:00

35 lines
486 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE
// FILE: A.java
public class A {
int foo() {return 1;}
}
// FILE: 1.kt
fun foo() = ""
open class B: A() {
init {
val a: Int = foo()
}
}
fun test() {
fun foo() = ""
class B: A() {
init {
val a: Int = <!INITIALIZER_TYPE_MISMATCH, TYPE_MISMATCH!>foo()<!> // todo
}
}
}
class E: A() {
fun foo() = A()
init {
val a: A = foo() // todo: discuss
}
}