Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329588

Summary: [1.4/1.5][compiler] Class cast issue with java.lang.Class and the 1.4/1.5 mixed mode
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Srikanth Sankaran <srikanth_sankaran>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: tjwatson
Version: 3.7Flags: Olivier_Thomann: review+
Target Milestone: 3.7 M4   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Patch with fix & tests none

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)