Community
Participate
Working Groups
Create a project with a seperate bin and source folder (the errors are weirder when they are the same). Create package x Create java file named A with contents package x; class A { } class B { } create java file C with contents package x; class C { B b; } The last file will generate error "B cannot be resolved (or is not a valid type) for the field C.b" I think this should be allowed...
Secondary types are legite, but discouraged. Incrementally they may not be found by compiling tools, which only expect to look types inside files with matching names. e.g. use javac and only mention x/A.java on the classpath (not as part of the compiled file on the command line), and you'll see that B won't be resolved. We may want to improve this down the road, but we don't want to become slow just for this case.
*** This bug has been marked as a duplicate of 32505 ***
Verified for 3.2 using M20060629-1905.