diff --git a/src/core/lombok/core/LombokNode.java b/src/core/lombok/core/LombokNode.java index 1d080c59..6fe37a6b 100644 --- a/src/core/lombok/core/LombokNode.java +++ b/src/core/lombok/core/LombokNode.java @@ -70,8 +70,12 @@ public abstract class LombokNode, L extends LombokNode() : children; - for (L child : this.children) child.parent = (L) this; - this.isStructurallySignificant = calculateIsStructurallySignificant(); + for (L child : this.children) { + child.parent = (L) this; + if (!child.isStructurallySignificant) + child.isStructurallySignificant = calculateIsStructurallySignificant(node); + } + this.isStructurallySignificant = calculateIsStructurallySignificant(null); } /** {@inheritDoc} */ @@ -101,7 +105,7 @@ public abstract class LombokNode, L extends LombokNode