Remove repeating scopes collected by buildCompletionContextForFunction

- This is certainly a bug, we would have to fix it later
This commit is contained in:
Roman Golyshev
2020-07-13 12:00:09 +03:00
committed by Ilya Kirillov
parent e3778d62e3
commit 29ee233bb9
@@ -93,11 +93,11 @@ internal class KtFirScopeProvider(
val towerDataContext = completionContext.getTowerDataContext(positionInFakeFile)
val implicitReceivers = towerDataContext.nonLocalTowerDataElements.mapNotNull { it.implicitReceiver }
val implicitReceivers = towerDataContext.nonLocalTowerDataElements.mapNotNull { it.implicitReceiver }.distinct()
val implicitReceiversTypes = implicitReceivers.map { builder.buildKtType(it.type) }
val implicitReceiverScopes = implicitReceivers.mapNotNull { it.implicitScope }
val nonLocalScopes = towerDataContext.nonLocalTowerDataElements.mapNotNull { it.scope }
val nonLocalScopes = towerDataContext.nonLocalTowerDataElements.mapNotNull { it.scope }.distinct()
val firLocalScopes = towerDataContext.localScopes
@OptIn(ExperimentalStdlibApi::class)