Implement visitPrimaryConstructor in LazyDeclarationResolver

It's need to prevent exception when trying to analyze each declaration
node within class

 #KT-7279 Fixed
 #KT-7315 Fixed
This commit is contained in:
Denis Zharkov
2015-04-06 20:23:39 +03:00
parent 1324667bc9
commit 37d7327482
2 changed files with 8 additions and 1 deletions
@@ -180,6 +180,13 @@ public class LazyDeclarationResolver {
return getBindingContext().get(BindingContext.CONSTRUCTOR, constructor);
}
@Override
public DeclarationDescriptor visitPrimaryConstructor(@NotNull JetPrimaryConstructor constructor, Void data) {
JetClass klass = constructor.getContainingClass();
getClassDescriptor(klass).getConstructors();
return getBindingContext().get(BindingContext.CONSTRUCTOR, klass);
}
@Override
public DeclarationDescriptor visitProperty(@NotNull JetProperty property, Void data) {
JetScope scopeForDeclaration = resolutionScopeToResolveDeclaration(property);