Community
Participate
Working Groups
xy/Try.java: package xy; public class Try { void hello() { C.world(); } } xy/C.java: package xy; class C { public static void world() { System.out.println("x"); } } Create two isolated ASTs. Compare the normalized binding of C#world with the one from the invocation C.world() in Try#hello returns false using isEqualTo. I normalized both binding first by calling getMethodDeclaration. The reason for the mismatch is that the type bindings for the declaring types have different modifiers.
The problem comes from the fact that I should not directly compare modifiers. I should mask the modifiers with AccJustFlags. In this case, one of the declaring class of the method was not resolved. This ended up with the modifiers still containing the AccUnresolved bit.
Fixed and released in HEAD. Regression test in ASTConverterTestAST3_2.test0600.
Verified in 20050330-0500