KTIJ-26423 [AA] Get rid of local declarations in KtFirImportOptimizer
Adjust `computeImportableName` to return null for when passed symbol is local
This commit is contained in:
@@ -54,6 +54,8 @@ internal fun KtTypeNullability.toConeNullability() = when (this) {
|
||||
* @return An [FqName] by which this symbol can be imported (if it is possible)
|
||||
*/
|
||||
internal fun FirCallableSymbol<*>.computeImportableName(useSiteSession: FirSession): FqName? {
|
||||
if (callableId.isLocal) return null
|
||||
|
||||
// if classId == null, callable is topLevel
|
||||
val containingClassId = callableId.classId
|
||||
?: return callableId.asSingleFqName()
|
||||
|
||||
-3
@@ -1,8 +1,5 @@
|
||||
USED DECLARATIONS:
|
||||
|
||||
Declaration: <local>.b
|
||||
By names: [b]
|
||||
|
||||
Declaration: dependency.Bar
|
||||
By names: [Bar]
|
||||
|
||||
|
||||
-3
@@ -1,8 +1,5 @@
|
||||
USED DECLARATIONS:
|
||||
|
||||
Declaration: <local>.b
|
||||
By names: [b]
|
||||
|
||||
Declaration: dependency.fooExtProp
|
||||
By names: [fooExtProp]
|
||||
|
||||
|
||||
-3
@@ -1,8 +1,5 @@
|
||||
USED DECLARATIONS:
|
||||
|
||||
Declaration: <local>.b
|
||||
By names: [b]
|
||||
|
||||
Declaration: dependency.Bar
|
||||
By names: [Bar]
|
||||
|
||||
|
||||
-6
@@ -1,11 +1,5 @@
|
||||
USED DECLARATIONS:
|
||||
|
||||
Declaration: <local>.<destruct>
|
||||
By names: [<destruct>]
|
||||
|
||||
Declaration: <local>.target
|
||||
By names: [target]
|
||||
|
||||
Declaration: dependency.component1
|
||||
By names: [component1]
|
||||
|
||||
|
||||
-3
@@ -1,8 +1,5 @@
|
||||
USED DECLARATIONS:
|
||||
|
||||
Declaration: <local>.<destruct>
|
||||
By names: [<destruct>]
|
||||
|
||||
Declaration: dependency.foo
|
||||
By names: [foo]
|
||||
|
||||
|
||||
-3
@@ -1,8 +1,5 @@
|
||||
USED DECLARATIONS:
|
||||
|
||||
Declaration: <local>.bar
|
||||
By names: [bar]
|
||||
|
||||
Declaration: kotlin.with
|
||||
By names: [with]
|
||||
|
||||
|
||||
-3
@@ -1,8 +1,5 @@
|
||||
USED DECLARATIONS:
|
||||
|
||||
Declaration: <local>.foo
|
||||
By names: [foo]
|
||||
|
||||
Declaration: kotlin.Int
|
||||
By names: [Int]
|
||||
|
||||
|
||||
-6
@@ -1,11 +1,5 @@
|
||||
USED DECLARATIONS:
|
||||
|
||||
Declaration: <local>.<destruct>
|
||||
By names: [<destruct>]
|
||||
|
||||
Declaration: <local>.holder
|
||||
By names: [holder]
|
||||
|
||||
Declaration: dependency.Holder
|
||||
By names: [Holder]
|
||||
|
||||
|
||||
-6
@@ -1,11 +1,5 @@
|
||||
USED DECLARATIONS:
|
||||
|
||||
Declaration: <local>.<destruct>
|
||||
By names: [<destruct>]
|
||||
|
||||
Declaration: <local>.target
|
||||
By names: [target]
|
||||
|
||||
Declaration: dependency.component1
|
||||
By names: [component1]
|
||||
|
||||
|
||||
-6
@@ -1,11 +1,5 @@
|
||||
USED DECLARATIONS:
|
||||
|
||||
Declaration: <local>.m
|
||||
By names: [m]
|
||||
|
||||
Declaration: <local>.str
|
||||
By names: [str]
|
||||
|
||||
Declaration: dependency.invoke
|
||||
By names: [str]
|
||||
|
||||
|
||||
-6
@@ -1,11 +1,5 @@
|
||||
USED DECLARATIONS:
|
||||
|
||||
Declaration: <local>.m
|
||||
By names: [m]
|
||||
|
||||
Declaration: <local>.str
|
||||
By names: [str]
|
||||
|
||||
Declaration: dependency.invoke
|
||||
By names: [invoke]
|
||||
|
||||
|
||||
-3
@@ -1,8 +1,5 @@
|
||||
USED DECLARATIONS:
|
||||
|
||||
Declaration: <local>.foo
|
||||
By names: [foo]
|
||||
|
||||
Declaration: dependency.invoke
|
||||
By names: [invoke]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user