Support destructuring declarations in scripts and REPL

#KT-5620 In Progress
 #KT-15810 In Progress
This commit is contained in:
Mikhail Zarechenskiy
2017-05-24 16:32:33 +03:00
parent 0e31c14a86
commit 400ecd5e13
21 changed files with 333 additions and 46 deletions
@@ -617,6 +617,8 @@ class ResolveElementCache(
override fun getTypeAliases(): MutableMap<KtTypeAlias, TypeAliasDescriptor> = hashMapOf()
override fun getDestructuringDeclarationEntries(): MutableMap<KtDestructuringDeclarationEntry, PropertyDescriptor> = hashMapOf()
override fun getDeclaringScope(declaration: KtDeclaration): LexicalScope? = declaringScopes(declaration)
override fun getScripts(): MutableMap<KtScript, LazyScriptDescriptor> = hashMapOf()
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -85,6 +85,10 @@ class StubBasedPackageMemberDeclarationProvider(
}
}
override fun getDestructuringDeclarationsEntries(name: Name): Collection<KtDestructuringDeclarationEntry> {
return emptyList()
}
override fun getAllDeclaredSubPackages(nameFilter: (Name) -> Boolean): Collection<FqName> {
return PackageIndexUtil.getSubPackageFqNames(fqName, searchScope, project, nameFilter)
}