Community
Participate
Working Groups
The code in ASTNode.java looks like that public static final int TEXT_BLOCK = 102; /** * Node type constant indicating a node of type * <code>RecordDeclaration</code>. * @see RecordDeclaration * @since 3.22 */ public static final int RECORD_DECLARATION = 103; /** * Node type constant indicating a node of type * <code>ModuleQualifiedName</code>. * @see ModuleQualifiedName * @since 3.24 */ public static final int MODULE_QUALIFIED_NAME = 103; /** * Node type constant indicating a node of type * <code>PatternInstanceofExpression</code>. * @see PatternInstanceofExpression * @since 3.26 */ public static final int PATTERN_INSTANCEOF_EXPRESSION = 104; We have two nodes sharing the same value. That way an ASTVisitor cannot find both nodes. These constants should be unique. Better would be to change to an enum to make such mistakes impossible, but ok...
Kalyan, would you be able to provide a patch in 4.21 M3?
I will fix it.
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183813
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183813 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=b3993ec1c6b672a5c799818175042469efe6cae8
Thanks Carsten for reporting!
Verified for 4.21 M3 using build I20210818-1800