From a1099660129a82e4b74108fe3597a92a780b3597 Mon Sep 17 00:00:00 2001 From: mmews Date: Tue, 23 Jul 2024 16:09:31 +0200 Subject: [PATCH] fix --- .../n4js/validation/validators/N4JSDestructureValidator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/org.eclipse.n4js/src/org/eclipse/n4js/validation/validators/N4JSDestructureValidator.java b/plugins/org.eclipse.n4js/src/org/eclipse/n4js/validation/validators/N4JSDestructureValidator.java index 5c5a3c4fec..5eeabeb98d 100644 --- a/plugins/org.eclipse.n4js/src/org/eclipse/n4js/validation/validators/N4JSDestructureValidator.java +++ b/plugins/org.eclipse.n4js/src/org/eclipse/n4js/validation/validators/N4JSDestructureValidator.java @@ -348,7 +348,7 @@ private boolean holdsCorrectTypeInDestructNode(RuleEnvironment G, DestructNode p * not have nested nodes or if they are positional (because then property look-up does not make sense). */ private IScope createMemberScope(DestructNode node, TypeRef valueTypeRef, EObject contextObject) { - if (node.nestedNodes != null && node.nestedNodes.length == 0 + if (node.nestedNodes != null && node.nestedNodes.length != 0 && !arePositional(Arrays.asList(node.nestedNodes))) { // also check visibility return destructureHelper.createMemberScopeForPropertyAccess(valueTypeRef, contextObject, true);