Split scripts and class/object declarations in DeclarationsProvider
simplifies code in most places, avoids filtering in places where they should be processed independently
This commit is contained in:
+3
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.cli.jvm.repl
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.psi.KtDestructuringDeclarationEntry
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.resolve.lazy.data.KtScriptInfo
|
||||
import org.jetbrains.kotlin.resolve.lazy.declarations.PackageMemberDeclarationProvider
|
||||
import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
|
||||
|
||||
@@ -45,6 +46,8 @@ open class DelegatePackageMemberDeclarationProvider(var delegate: PackageMemberD
|
||||
|
||||
override fun getClassOrObjectDeclarations(name: Name) = delegate.getClassOrObjectDeclarations(name)
|
||||
|
||||
override fun getScriptDeclarations(name: Name): Collection<KtScriptInfo> = delegate.getScriptDeclarations(name)
|
||||
|
||||
override fun getTypeAliasDeclarations(name: Name) = delegate.getTypeAliasDeclarations(name)
|
||||
|
||||
override fun getDeclarationNames() = delegate.getDeclarationNames()
|
||||
|
||||
Reference in New Issue
Block a user