Don't allow to use own members when resolve super constructor call in (companion) object

This commit is contained in:
Zalim Bashorov
2015-12-14 18:45:17 +03:00
parent e9ea4cc953
commit 69c2668530
6 changed files with 114 additions and 1 deletions
@@ -45,7 +45,7 @@ class ClassResolutionScopesSupport(
}
public val scopeForConstructorHeaderResolution: () -> LexicalScope = storageManager.createLazyValue {
scopeWithGenerics(scopeForStaticMemberDeclarationResolution())
scopeWithGenerics(if (classDescriptor.kind.isSingleton) scopeForCompanionObjectHeaderResolution() else scopeForStaticMemberDeclarationResolution())
}
private val inheritanceScopeWithoutMe: () -> LexicalScope = storageManager.createLazyValue(onRecursion = createThrowingLexicalScope) {