KTIJ-26423 [AA] Ignore artificial Array type from varargs parameters in KtFirImportOptimizer
This commit is contained in:
+8
-1
@@ -519,7 +519,14 @@ private sealed interface TypeQualifier {
|
|||||||
|
|
||||||
private val FirResolvedTypeRef.isPresentInSource: Boolean
|
private val FirResolvedTypeRef.isPresentInSource: Boolean
|
||||||
get() = when (source?.kind) {
|
get() = when (source?.kind) {
|
||||||
is KtRealSourceElementKind -> true
|
is KtRealSourceElementKind -> {
|
||||||
|
val isArrayFromVararg = delegatedTypeRef?.source?.kind is KtFakeSourceElementKind.ArrayTypeFromVarargParameter;
|
||||||
|
|
||||||
|
// type ref with delegated type ref with such source kind is NOT directly present in the source, so we ignore it
|
||||||
|
!isArrayFromVararg
|
||||||
|
}
|
||||||
|
|
||||||
|
// type ref with such source kind is explicitly present in the source, so we want to see it
|
||||||
is KtFakeSourceElementKind.ArrayTypeFromVarargParameter -> true
|
is KtFakeSourceElementKind.ArrayTypeFromVarargParameter -> true
|
||||||
|
|
||||||
else -> false
|
else -> false
|
||||||
|
|||||||
-3
@@ -3,7 +3,4 @@ USED DECLARATIONS:
|
|||||||
Declaration: dependency.Bar
|
Declaration: dependency.Bar
|
||||||
By names: [Bar]
|
By names: [Bar]
|
||||||
|
|
||||||
Declaration: kotlin.Array
|
|
||||||
By names: [Bar]
|
|
||||||
|
|
||||||
UNRESOLVED NAMES:
|
UNRESOLVED NAMES:
|
||||||
|
|||||||
Reference in New Issue
Block a user