[LL] Don't filter out metadata declaration from stub symbol provider

Now the stub-based symbol provider is reused for common source sets,
which use metadata dependencies. Filtering should be done on scope
level, then declaration provider won't yield them in the first place.

KT-58769
This commit is contained in:
Pavel Kirpichenkov
2023-07-13 20:25:25 +03:00
committed by teamcity
parent 71b29f0cd7
commit 9b82ff7a8d
2 changed files with 2 additions and 7 deletions
@@ -141,11 +141,6 @@ internal open class StubBasedFirDeserializedSymbolProvider(
return ArrayList<FirNamedFunctionSymbol>(topLevelFunctions.size).apply {
for (function in topLevelFunctions) {
val file = function.containingKtFile
if (file.virtualFile.extension == MetadataPackageFragment.METADATA_FILE_EXTENSION) {
continue
}
val functionStub = function.stub as? KotlinFunctionStubImpl ?: loadStubByElement(function)
val containerSource = getFacadeContainerSource(function.containingKtFile, functionStub?.origin)
@@ -5,10 +5,10 @@
// FILE: common.kt
// TARGET_PLATFORM: Common
import kotlin.collections.<!UNRESOLVED_IMPORT!>listOf<!>
import kotlin.collections.listOf
fun common() {
<!UNRESOLVED_REFERENCE!>listOf<!>("foo", "bar").map { <!UNRESOLVED_REFERENCE!>it<!> }
listOf("foo", "bar").map { it }
}
// MODULE: jvm