[FIR] Avoid duplicate diagnostics on expression.typeRef

This commit is contained in:
Mikhail Glukhikh
2020-08-02 13:37:13 +03:00
parent dc46d51d9a
commit 951aa8185e
9 changed files with 82 additions and 42 deletions
@@ -15,12 +15,12 @@ fun case_3() {
}
val x = object<T, K: Comparable<K>> {
fun test() = 10 as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>T<!> // OK
fun test() = 10 as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>T<!> // OK
}
fun case_4() {
val x = object<T> {
fun test() = 10 as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>T<!>
fun test() = 10 as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>T<!>
}
val y = x.test() // type y is T
@@ -15,12 +15,12 @@ fun case_3() {
}
val x = object<T, K: Comparable<K>> {
fun test() = 10 as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>T<!> // OK
fun test() = 10 as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>T<!> // OK
}
fun case_4() {
val x = object<T> {
fun test() = 10 as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>T<!>
fun test() = 10 as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>T<!>
}
val y = x.test() // type y is T