Bug 6927 - Static inner class won't compile (doesn't match JDK behavior)
Summary: Static inner class won't compile (doesn't match JDK behavior)
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: 2.0 M2   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-12-13 20:20 EST by Mark Rose CLA
Modified: 2002-01-11 08:56 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 Mark Rose CLA 2001-12-13 20:20:30 EST
The file included below compiles fine with JDK 1.3.1_01, but I get this error 
on line 17 when compiling with Eclipse 2.0 build 20011206:

The member type Factory cannot be declared static; static types can only be 
declared in static or top level types

--- source file Member.java ---
import java.io.Serializable;
import java.util.Iterator;

public interface Member extends Serializable
{

    public abstract static class Type //extends AbstractValueMap
    {

	private Type()
        {
        }

        public interface Group extends Serializable
        {

            public final static class Factory
            {
                private Factory()
                {
                }
            }
        }
    }
}
Comment 1 Philipe Mulet CLA 2001-12-18 06:32:06 EST
Changed the static modifier check to allow this scenario (member interfaces are 
treated as static).
Fixed