Bug 77324

Summary: Cannot resolve inner or nester enum class
Product: [Eclipse Project] JDT Reporter: James Watson <james_matthew_watson>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: critical    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Linux   
Whiteboard:

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 ***