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:
@@ -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);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.JetObjectDeclaration
|
||||
// OPTIONS: usages
|
||||
class A {
|
||||
class A() {
|
||||
init {
|
||||
foo()
|
||||
v
|
||||
|
||||
Reference in New Issue
Block a user