Bug 34002 - Bogus compiler error "cannot be resolved" in editor for 2nd top-level class in compilation unit
Summary: Bogus compiler error "cannot be resolved" in editor for 2nd top-level class i...
Status: VERIFIED DUPLICATE of bug 32505
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.2 M4   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-06 13:36 EST by Eric Nickell CLA
Modified: 2007-04-02 07:24 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Nickell CLA 2003-03-06 13:36:29 EST
If one has a second top-level class in a compilation unit, and another class in
the package makes a reference to it, the Java editor says that it cannot resolve
the type name, although the Package Explorer indicates that it compiles cleanly.

I find it quite unnerving to have red ticks next to my scroll bar for legal code.

I'm running I20030227/linux/gtk on a dual-processor 2GHz pentium.

Here is a test case (in two compilation units):

/*
 * Created on Mar 6, 2003 by Eric Nickell.
 * 
 * Copyright (C) 2003, Palo Alto Research Center, Incorporated. All rights reserved.
 */
package buildI20030227.editorcantseeclass;

/**
 * @author nickell
 */
public class FirstClass {

}

class SecondClass {
}


/*
 * Created on Mar 6, 2003 by Eric Nickell.
 * 
 * Copyright (C) 2003, Palo Alto Research Center, Incorporated. All rights reserved.
 */
package buildI20030227.editorcantseeclass;

/**
 * @author nickell
 */
public class ThirdClass {
	SecondClass thisReferenceToSecondClassIsFlaggedAsErrorByEditorButIsReallyLegal;
}
Comment 1 Philipe Mulet CLA 2003-03-06 17:34:23 EST

*** This bug has been marked as a duplicate of 32505 ***
Comment 2 Frederic Fusier CLA 2007-04-02 07:24:36 EDT
Verified for 3.2 using M20060629-1905.