Skip to content

Commit f0cca84

Browse files
Rob Strykerdatho7561
authored andcommitted
[DOM] Fix testBug497719_0002, allowing super field and field access in try-with-resources
Signed-off-by: Rob Stryker <[email protected]>
1 parent 054b9d1 commit f0cca84

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2683,6 +2683,10 @@ private TryStatement convertTryStatement(JCTry javac, ASTNode parent) {
26832683
res.resources().add(working);
26842684
} else if( this.ast.apiLevel >= AST.JLS9_INTERNAL && working instanceof Name){
26852685
res.resources().add(working);
2686+
} else if( this.ast.apiLevel >= AST.JLS9_INTERNAL && working instanceof SuperFieldAccess){
2687+
res.resources().add(working);
2688+
} else if( this.ast.apiLevel >= AST.JLS9_INTERNAL && working instanceof FieldAccess){
2689+
res.resources().add(working);
26862690
} else {
26872691
res.setFlags(res.getFlags() | ASTNode.MALFORMED);
26882692
}

0 commit comments

Comments
 (0)