- changed status to resolved
Direct instantiation of inner class without enclosing reference in static inner class
Issue #95
resolved
JastAddJ 7.1.1-271-g22d48cf Java SE 7
It should not be possible to create an instance of an inner class in a static class without an enclosing class instance.
Test case:
// Can not, in a static class, directly instantiate inner class of enclosing type.
// .result=COMPILE_FAIL
class Test {
static class C {
D d = new D();// error
}
class D {
}
}
Comments (1)
-
reporter - Log in to comment
Check if enclosing class is static
fixes
#95(bitbucket)→ <<cset ba3100aa5780>>