Bug 38124 - Brackets around cast accepted by Eclipse but not javac
Summary: Brackets around cast accepted by Eclipse but not javac
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-26 15:10 EDT by James Moody CLA
Modified: 2003-06-06 07:57 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 James Moody CLA 2003-05-26 15:10:07 EDT
Windows XP, Eclipse 2.1. Default compiler settings.

Object o = ((Object))(new Object());

This code is accepted by the Eclipse compiler but not by javac. Tested with 
IBM JDK 1.3.1. 

It may be that javac is non-compliant, but I thought I'd report it anyway as 
it is a difference.
Comment 1 Philipe Mulet CLA 2003-05-27 05:30:40 EDT
Good find, this is indeed our bug. Fixed in latest.
Comment 2 Philipe Mulet CLA 2003-05-27 06:02:19 EDT
Regression test added (NegativeTest#test346)
Comment 3 David Audel CLA 2003-06-06 07:57:09 EDT
Verified.