Do not add special names to scopes even partially

See 7a41d13b41
It's may be dangerous to call `addDescriptor` and then
not to add descriptor into the variablesAndClassifiersByName map
This commit is contained in:
Denis Zharkov
2016-10-14 12:04:42 +03:00
parent fe901e9516
commit 48c33333ee
@@ -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
}
}
}