1.3.1, 611, win2k
IDEA incorrectly flags errors in references to inner classes when you have a
non-inner class in the same package with the same name.
Example:
A.java:
public class A
{
class B {
public B(String x) {
}
}
}
B.java:
public class B
{
}
C.java:
public class C extends A
{
public void doSomething() {
B b = new B("hello"); // IDEA underlines "hello"
}
}
In C.java, the usage of B's constructor is in fact correct (compiles fine
with both javac and jikes). The code is referring to the inner class B
defined in C's ancestor which actually takes precedence over the outer class
B. IDEA's editor claims that "B() cannnot be applied to
(java.lang.String)". If I change the call to:
B b = new B();
IDEA thinks it is fine, but compiling it with javac or jikes produces an
error:
"cannot resolve symbol constructor B()".
Khaled.
_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list