KT-8442 related: destructuring declarations aren't taken into account during light classes generation, fixes EA-81204

This commit is contained in:
Mikhail Glukhikh
2016-10-24 16:47:45 +03:00
parent b7e8071a7d
commit e7e56ab85c
7 changed files with 47 additions and 4 deletions
@@ -282,8 +282,9 @@ class IDELightClassGenerationSupport(private val project: Project) : LightClassG
ForceResolveUtil.forceResolveAllContents(descriptor)
}
}
else if (declaration is KtClassOrObject || declaration is KtTypeAlias) {
// Do nothing: we are not interested in classes or type aliases
else if (declaration is KtClassOrObject || declaration is KtTypeAlias || declaration is KtDestructuringDeclaration) {
// Do nothing: we are not interested in classes or type aliases,
// and all destructuring declarations are erroneous at top level
}
else {
LOG.error("Unsupported declaration kind: " + declaration + " in file " + file.name + "\n" + file.text)