FIR IDE: remove KtUnsubstitutedScope/KtSubstitutedScope as it designed wrong

This commit is contained in:
Ilya Kirillov
2021-05-05 14:58:47 +02:00
committed by TeamCityServer
parent 90798d8857
commit 47dc524763
3 changed files with 3 additions and 12 deletions
@@ -90,12 +90,6 @@ interface KtDeclarationScope<out T : KtSymbolWithDeclarations> : KtScope {
val owner: T
}
interface KtPackageScope : KtScope, KtSubstitutedScope<KtPackageScope> {
interface KtPackageScope : KtScope {
val fqName: FqName
}
interface KtUnsubstitutedScope<S : KtScope> : KtScope {
fun substitute(/*substitution*/): KtSubstitutedScope<S> = TODO()
}
interface KtSubstitutedScope<S> : KtScope
}
@@ -11,7 +11,6 @@ import org.jetbrains.kotlin.idea.frontend.api.ValidityTokenOwner
import org.jetbrains.kotlin.idea.frontend.api.fir.KtSymbolByFirBuilder
import org.jetbrains.kotlin.idea.frontend.api.fir.utils.weakRef
import org.jetbrains.kotlin.idea.frontend.api.scopes.KtDeclaredMemberScope
import org.jetbrains.kotlin.idea.frontend.api.scopes.KtUnsubstitutedScope
import org.jetbrains.kotlin.idea.frontend.api.symbols.markers.KtSymbolWithMembers
internal class KtFirDeclaredMemberScope(
@@ -21,7 +20,6 @@ internal class KtFirDeclaredMemberScope(
builder: KtSymbolByFirBuilder
) : KtFirDelegatingScope<FirClassDeclaredMemberScope>(builder, token),
KtDeclaredMemberScope,
KtUnsubstitutedScope<KtFirDeclaredMemberScope>,
ValidityTokenOwner {
override val firScope: FirClassDeclaredMemberScope by weakRef(firScope)
}
@@ -11,7 +11,6 @@ import org.jetbrains.kotlin.idea.frontend.api.ValidityTokenOwner
import org.jetbrains.kotlin.idea.frontend.api.fir.KtSymbolByFirBuilder
import org.jetbrains.kotlin.idea.frontend.api.fir.utils.weakRef
import org.jetbrains.kotlin.idea.frontend.api.scopes.KtMemberScope
import org.jetbrains.kotlin.idea.frontend.api.scopes.KtUnsubstitutedScope
import org.jetbrains.kotlin.idea.frontend.api.symbols.markers.KtSymbolWithMembers
internal class KtFirMemberScope(
@@ -19,7 +18,7 @@ internal class KtFirMemberScope(
firScope: FirTypeScope,
token: ValidityToken,
builder: KtSymbolByFirBuilder
) : KtFirDelegatingScope<FirTypeScope>(builder, token), KtMemberScope, KtUnsubstitutedScope<KtMemberScope>, ValidityTokenOwner {
) : KtFirDelegatingScope<FirTypeScope>(builder, token), KtMemberScope, ValidityTokenOwner {
override val firScope: FirTypeScope by weakRef(firScope)
}