Bug 8706 - Compile error when compiling an anonymous class which extends java.awt.Frame
Summary: Compile error when compiling an anonymous class which extends java.awt.Frame
Status: RESOLVED DUPLICATE of bug 8697
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 normal (vote)
Target Milestone: 2.0 M3   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-29 17:28 EST by Olivier Thomann CLA
Modified: 2002-02-11 04:52 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 Olivier Thomann CLA 2002-01-29 17:28:35 EST
Using 20020125:

Test case:
[import java.awt.Frame;

public class X2 {
	public Frame cancel() {
		Frame sharedOwnerFrame = null;
		if (sharedOwnerFrame == null) {
			sharedOwnerFrame = new Frame() {
				public synchronized void dispose() {
				}
			};
		}
		return sharedOwnerFrame;
	}
}]

Compile the following test case. The compiler returns:
----------
1. ERROR in d:/tmp/X2.java (at line 8)
	sharedOwnerFrame = new Frame() {
             public synchronized void dispose() {
             }
         };
	
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The operator unknown operator is undefined for the argument type(s) 
java.awt.Frame, <anonymous subclass of java.awt.Frame>
----------
Compiled 14 lines in 2463 ms (5.6 lines/s)
1 problem (1 error)

Javac 1.3.1 and 1.4RC compile it fine.
Comment 1 Philipe Mulet CLA 2002-01-31 05:41:22 EST
Fixed

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