More correct implementation of addImportingScopes

This commit is contained in:
Valentin Kipyatkov
2016-11-07 13:56:26 +03:00
parent 109ec11d51
commit 8cd35f67fd
@@ -180,7 +180,7 @@ fun LexicalScope.addImportingScopes(importScopes: List<ImportingScope>): Lexical
val lastLexicalScope = parentsWithSelf.last { it is LexicalScope }
val firstImporting = lastLexicalScope.parent as ImportingScope
val newFirstImporting = chainImportingScopes(importScopes, firstImporting)
return LexicalScopeWrapper(this, newFirstImporting!!)
return replaceImportingScopes(newFirstImporting)
}
fun LexicalScope.addImportingScope(importScope: ImportingScope): LexicalScope