[FIR] Avoid duplicate diagnostics on expression.typeRef
This commit is contained in:
@@ -12,15 +12,15 @@ class MyColor(val x: <!UNRESOLVED_REFERENCE!>Color.RED<!>, y: <!UNRESOLVED_REFER
|
||||
var z: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Color.RED<!> = Color.RED
|
||||
set(arg: Color.RED) { z = arg }
|
||||
|
||||
fun foo(arg: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Color.RED<!>): <!UNRESOLVED_REFERENCE!>Color.RED<!> = arg
|
||||
fun foo(arg: <!UNRESOLVED_REFERENCE!>Color.RED<!>): <!UNRESOLVED_REFERENCE!>Color.RED<!> = arg
|
||||
|
||||
fun bar(): <!UNRESOLVED_REFERENCE!>Color.RED<!> {
|
||||
class Local : <!UNRESOLVED_REFERENCE!>Color.RED<!>
|
||||
fun local(arg: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Color.RED<!>): <!UNRESOLVED_REFERENCE!>Color.RED<!> = arg
|
||||
fun local(arg: <!UNRESOLVED_REFERENCE!>Color.RED<!>): <!UNRESOLVED_REFERENCE!>Color.RED<!> = arg
|
||||
val temp: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Color.RED<!> = Color.RED
|
||||
temp as? <!UNRESOLVED_REFERENCE!>Color.RED<!>
|
||||
if (temp is <!UNRESOLVED_REFERENCE!>Color.RED<!>) {
|
||||
return temp as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Color.RED<!>
|
||||
return temp as <!UNRESOLVED_REFERENCE!>Color.RED<!>
|
||||
}
|
||||
val obj = object : <!UNRESOLVED_REFERENCE!>Color.RED<!> {}
|
||||
if (obj is <!UNRESOLVED_REFERENCE!>Color.RED<!>) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class P
|
||||
|
||||
fun foo(p: P): Any {
|
||||
val v = p as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>G<!>
|
||||
val v = p as <!UNRESOLVED_REFERENCE!>G<!>
|
||||
return v
|
||||
}
|
||||
+2
-2
@@ -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
|
||||
|
||||
Vendored
+2
-2
@@ -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
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ fun <E> foo(x: Any, y: Any) : Any {
|
||||
return y
|
||||
}
|
||||
|
||||
y as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Outer<*>.Inner<!>
|
||||
y as <!UNRESOLVED_REFERENCE!>Outer<*>.Inner<!>
|
||||
|
||||
return C()
|
||||
}
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ fun foo() {
|
||||
}
|
||||
}
|
||||
|
||||
fun bar(i: Int, a: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>U<!>) {
|
||||
fun bar(i: Int, a: <!UNRESOLVED_REFERENCE!>U<!>) {
|
||||
val r = if (true) i else a
|
||||
val b: Any = r
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -6,7 +6,7 @@ open class Base {
|
||||
|
||||
class Derived : Base()
|
||||
|
||||
fun test(x: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Derived.Nested<!>) = x
|
||||
fun test(x: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Derived.Nested<!>) = x
|
||||
|
||||
fun Base.testWithImplicitReceiver(x: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Nested<!>) {
|
||||
val y: <!UNRESOLVED_REFERENCE!>Nested<!> = x
|
||||
|
||||
@@ -11,12 +11,12 @@ class Outer<T> {
|
||||
typealias InnerAlias = Inner
|
||||
typealias GenericInnerAlias<TT> = GenericInner<TT>
|
||||
|
||||
fun test1(x: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>NestedAlias<!>) = x
|
||||
fun test2(x: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>GenericNestedAlias<Int><!>) = x
|
||||
fun <T> test3(x: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>GenericNestedAlias<T><!>) = x
|
||||
fun test4(x: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>InnerAlias<!>) = x
|
||||
fun test5(x: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>GenericInnerAlias<Int><!>) = x
|
||||
fun <T> test6(x: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>GenericInnerAlias<T><!>) = x
|
||||
fun test1(x: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>NestedAlias<!>) = x
|
||||
fun test2(x: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>GenericNestedAlias<Int><!>) = x
|
||||
fun <T> test3(x: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>GenericNestedAlias<T><!>) = x
|
||||
fun test4(x: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>InnerAlias<!>) = x
|
||||
fun test5(x: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>GenericInnerAlias<Int><!>) = x
|
||||
fun <T> test6(x: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>GenericInnerAlias<T><!>) = x
|
||||
}
|
||||
fun test1(x: Outer<Int>.NestedAlias) = x
|
||||
fun <T> test2(x: Outer<T>.NestedAlias) = x
|
||||
|
||||
Reference in New Issue
Block a user