Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329588 - [1.4/1.5][compiler] Class cast issue with java.lang.Class and the 1.4/1.5 mixed mode
Summary: [1.4/1.5][compiler] Class cast issue with java.lang.Class and the 1.4/1.5 mix...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.7 M4   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 329593 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-11-05 16:21 EDT by Olivier Thomann CLA
Modified: 2010-12-07 12:12 EST (History)
1 user (show)

See Also:
Olivier_Thomann: review+


Attachments
Patch with fix & tests (5.27 KB, patch)
2010-11-06 08:56 EDT, Srikanth Sankaran CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2010-11-05 16:21:54 EDT
I'll attach a test case that describe the problem.

Casting to (Class) doesn't work in some situation when 1.4 and 1.5 types are mixed.
Comment 1 Olivier Thomann CLA 2010-11-05 16:28:04 EDT
Regression test in:
org.eclipse.jdt.core.tests.compiler.regression.MethodVerifyTest._test329588()

I also have a workspace with a more complete test case to validate the change for this bug.
Comment 2 Srikanth Sankaran CLA 2010-11-06 08:56:11 EDT
Created attachment 182554 [details]
Patch with fix & tests

Fix for type equivalence problem outlined/anticipated in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=323633#c14
Comment 3 Olivier Thomann CLA 2010-11-06 12:09:26 EDT
This is already released.
So closing as FIXED.
Comment 4 Srikanth Sankaran CLA 2010-11-06 12:28:29 EDT
Olivier, please review, TIA.
Comment 5 Srikanth Sankaran CLA 2010-11-06 13:28:22 EDT
*** Bug 329593 has been marked as a duplicate of this bug. ***
Comment 6 Olivier Thomann CLA 2010-11-12 08:55:32 EST
Looks good.
Comment 7 Olivier Thomann CLA 2010-12-07 12:12:17 EST
Verified using I20101207-0250 (4.1 I-build)