Community
Participate
Working Groups
i have 2 cus: A.java package p; public class A { private class Inner{ private static final int PREVIEW_ID= I.I+ 1; void m(){ /*[*/m();/*]*/ } } } I.java package p; public interface I{ int I= 0; } try extracting the selected fragment in A::m() you get a dialog saying that there is a compilation error, which is incorrect.
I suspect this is because we are building the AST using the Java Model as a lookup environment. The Java model doesn't contain any constant definition so the AST can't correctly resolve it and produces an error. Philippe, do we have to move this error to flow analysis too, as we did with the switch statement ?
Yes, this is a similar problem, and yes we could defer the error reporting. I'll take this one on our side.
Fixed in latest