Community
Participate
Working Groups
The following code snipped compiles fine, but Eclpse complains with the following error: The method put is defined in an inherited type and an enclosing scope. It's obviously dependent on other code (It's a simplified exerpt from the xwt source code http://www.xwt.org), but it should be self explanatory that put is an inherited method. import org.xwt.js.*; public final class XWT extends JS.Obj { public void put(Object name, Object value) { } private static class XWTMath extends JS.Obj { public XWTMath() { JS gs = new JS.GlobalScope(); put("isNaN",gs.get("isNaN")); } } }
Which drop on you running? Can you please provide the source for the class JS.Obj (or at least the spec of any method named put, regardless of the number of parameters)? BTW: Why are both classes extending the same superclass?
I can reproduce the error in Eclipse with the Compiler compliance level set to 1.3 when I define the method put in the superclass JS.Obj. I can also generate the same error using javac 1.3. When I try the case with javac 1.4.1 & Eclipse with the Compiler compliance level set to 1.4... both compile without any errors. I'm closing this PR, reopen it if you can provide a complete testcase that shows Eclipse fails against the matching version of javac (or any other compiler).