Static import-on-demand with wrong qualified name of inner class
Issue #111
resolved
JastAddJ 7.1.1-313-gbcfa5f1 Java SE 7
JastAddJ allows a static import-on-demand declaration with an incorrect qualified name referring to an inner class.
Test case:
import static pkg.B.Inner.*;
class Test {}
/// package "pkg":
public class A {
public static class Inner {}
}
public class B extends A {
}
The above test should fail to compile because pkg.B.Inner
is not the canonical name of pkg.A.Inner
.
Comments (3)
-
reporter -
reporter Regression test:
pkg/import_04f
-
reporter - changed status to resolved
- Log in to comment
StaticImportOnDemandDecl
should have a name check method similar to that forTypeImportOnDemandDecl
:A similar error-checking method exists for
SingleStaticImportDecl
injava5/frontend/StaticImports.jrag
.