diff options
author | Manoj Palat | 2021-03-01 13:13:28 +0000 |
---|---|---|
committer | Manoj Palat | 2021-03-01 13:13:28 +0000 |
commit | 60e35c65de83ca4b419a4fb8dc7a9ebdbd0d836c (patch) | |
tree | 90bbf190b010e2ee28951a9a383df773741a4e56 | |
parent | 4a28a3e9e6e97eb0e42bf32716d56731b21959f1 (diff) | |
download | eclipse.jdt.core-60e35c65de83ca4b419a4fb8dc7a9ebdbd0d836c.tar.gz eclipse.jdt.core-60e35c65de83ca4b419a4fb8dc7a9ebdbd0d836c.tar.xz eclipse.jdt.core-60e35c65de83ca4b419a4fb8dc7a9ebdbd0d836c.zip |
leaves canonical constructor in incomplete state
Change-Id: I91dee3efb840a48487fae039391ae18580842317
Signed-off-by: Manoj Palat <manpalat@in.ibm.com>
-rw-r--r-- | org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java index 1971851515..391ccc8692 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java @@ -484,6 +484,9 @@ public class ExplicitConstructorCall extends Statement implements Invocation { private boolean checkAndFlagExplicitConstructorCallInCanonicalConstructor(AbstractMethodDeclaration methodDecl, BlockScope scope) { + if (methodDecl.binding == null || methodDecl.binding.declaringClass == null + || !methodDecl.binding.declaringClass.isRecord()) + return true; boolean isInsideCCD = methodDecl instanceof CompactConstructorDeclaration; if (this.accessMode != ExplicitConstructorCall.ImplicitSuper) { if (isInsideCCD) |