[FIR] Don't report duplicated errors in component calls typeRefs
This commit is contained in:
+19
@@ -89,6 +89,25 @@ abstract class AbstractDiagnosticCollector(
|
||||
functionCall.calleeReference.accept(visitor)
|
||||
}
|
||||
|
||||
override fun visitComponentCall(componentCall: FirComponentCall) {
|
||||
componentCall.runComponents()
|
||||
// same as FirFunctionCall.typeRef that
|
||||
// you can see above
|
||||
componentCall.annotations.forEach { it.accept(visitor) }
|
||||
componentCall.typeArguments.forEach { it.accept(visitor) }
|
||||
componentCall.argumentList.accept(visitor)
|
||||
componentCall.calleeReference.accept(visitor)
|
||||
componentCall.explicitReceiver.accept(visitor)
|
||||
if (componentCall.dispatchReceiver !== componentCall.explicitReceiver) {
|
||||
componentCall.dispatchReceiver.accept(visitor)
|
||||
}
|
||||
if (componentCall.extensionReceiver !== componentCall.explicitReceiver &&
|
||||
componentCall.extensionReceiver !== componentCall.dispatchReceiver
|
||||
) {
|
||||
componentCall.extensionReceiver.accept(visitor)
|
||||
}
|
||||
}
|
||||
|
||||
private fun visitJump(loopJump: FirLoopJump) {
|
||||
loopJump.runComponents()
|
||||
loopJump.acceptChildren(this)
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
||||
data class A(val i: Int, val j: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>G<!>)
|
||||
data class B(val i: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>G<!>, val j: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>G<!>)
|
||||
|
||||
|
||||
fun fa(a: A) {
|
||||
val (i, j) = a
|
||||
val i2 = a.component1()
|
||||
val j2 = a.component2()
|
||||
}
|
||||
|
||||
fun fb(b: B) {
|
||||
val (i, j) = b
|
||||
val i2 = b.component1()
|
||||
val j2 = b.component2()
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
||||
data class A(val i: Int, val j: <!UNRESOLVED_REFERENCE!>G<!>)
|
||||
data class B(val i: <!UNRESOLVED_REFERENCE!>G<!>, val j: <!UNRESOLVED_REFERENCE!>G<!>)
|
||||
|
||||
Reference in New Issue
Block a user