- 
    Enhancement 
- 
    Resolution: Fixed
- 
     P3 P3
- 
    8
- 
        b64
- 
        generic
- 
        generic
- 
        Verified
                    Although legal, the use of multiple top level classes in the same file is somewhat questionable to begin with, but it is particularly bad when in some package class A in A.java refers to class B defined in C.java.  This requires that at times the files must be compiled together, and prevents implicit compilation from locating such "hidden classes".
It would be a fine thing for javac to provide an optional warning to detect such references.
One suggestion is to add a new suboption to -Xlint, namely -Xlint:auxiliaryclass.
            
It would be a fine thing for javac to provide an optional warning to detect such references.
One suggestion is to add a new suboption to -Xlint, namely -Xlint:auxiliaryclass.
- duplicates
- 
                    JDK-5067688 javac should restrict source file name if class used outside source file -           
- Closed
 
-         
- relates to
- 
                    JDK-6543180 Suggest -Xlint option for private top-level classes -           
- Resolved
 
-