Bug 77324 - Cannot resolve inner or nester enum class
Summary: Cannot resolve inner or nester enum class
Status: RESOLVED DUPLICATE of bug 76880
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: 3.1 M3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-29 14:51 EDT by James Watson CLA
Modified: 2004-10-31 19:22 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Watson CLA 2004-10-29 14:51:11 EDT
Create a class sucha as the following:
<code>
public class Hand implements Comparable<Hand>
{
    private Rank rank;

    public static enum Rank
    {
        LOW("low"),
        HIGH_CARD("high card"),
        ONE_PAIR("pair"),
        TWO_PAIR("two pair"),
        THREE_OF_A_KIND("three of a kind"),
        STRAIGHT("straight"),
        FLUSH("flush"),
        FULL_HOUSE("full house"),
        FOUR_OF_A_KIND("four of a kind"),
        STRAIGHT_FLUSH("straight flush");

        public String name;
        
        private Rank(final String name)
        {
            this.name = name;
        }

        public String toString()
        {
            return name;
        }
    }
}</code>

Eclipse will complain that Rank cannot be resolved.  No errors are reported for
the Rank declaration and the code compiles from the command line.
Comment 1 James Watson CLA 2004-10-29 14:52:31 EDT
Remove implements Comparable<Hand> from the declaration to verify.
Comment 2 Philipe Mulet CLA 2004-10-31 19:22:41 EST
Works for me in latest. 

*** This bug has been marked as a duplicate of 76880 ***