From 48c33333eeefd93baaba6c8ab0d4da37bd0f33c1 Mon Sep 17 00:00:00 2001 From: Denis Zharkov Date: Fri, 14 Oct 2016 12:04:42 +0300 Subject: [PATCH] Do not add special names to scopes even partially See 7a41d13b410b5650a7061b954934118af16b7ac6 It's may be dangerous to call `addDescriptor` and then not to add descriptor into the variablesAndClassifiersByName map --- .../jetbrains/kotlin/resolve/scopes/LexicalScopeStorage.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/scopes/LexicalScopeStorage.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/scopes/LexicalScopeStorage.kt index b01cd3d520b..c4102719b4c 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/scopes/LexicalScopeStorage.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/scopes/LexicalScopeStorage.kt @@ -55,9 +55,8 @@ abstract class LexicalScopeStorage( protected fun addVariableOrClassDescriptor(descriptor: DeclarationDescriptor) { val name = descriptor.name - val descriptorIndex = addDescriptor(descriptor) - if (name.isSpecial) return + val descriptorIndex = addDescriptor(descriptor) if (variablesAndClassifiersByName == null) { variablesAndClassifiersByName = HashMap() @@ -125,4 +124,4 @@ abstract class LexicalScopeStorage( } while (rest != null) return result } -} \ No newline at end of file +}