[Java Spec Report] reference to nonstatic type from static context

"Neal Gafter" <[email protected]> Sun, 04 Apr 2004 07:50:45 -0000
Newsgroups gmane.comp.java.spec-report
Message-ID <[email protected]>
I know of no compilers that properly implement this JLS rule:

// JLS 8.5.2, 2nd paragraph: It is a compile-time error if a static
// class contains a usage of a non-static member of an enclosing
// class.
class A {
    class B {}
    static class C {
        B b; // error
    }
}



To unsubscribe from this mailing list, send an email to:
[email protected]
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/java-spec-report/

<*> To unsubscribe from this group, send an email to:
     [email protected]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/