Summary: | [1.5][compiler] ClassCastException in JDT Compiler | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Kay Huber <quorg.xtn> | ||||
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> | ||||
Status: | VERIFIED DUPLICATE | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | Olivier_Thomann, philippe_mulet | ||||
Version: | 3.4 | ||||||
Target Milestone: | 3.4 RC2 | ||||||
Hardware: | PC | ||||||
OS: | Windows Vista | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Kay Huber
2008-06-03 16:32:05 EDT
Could you please provide a test case that is causing this problem? I'll need some time to do that. I found the line in the code, where the compiler struggles over, however, that line includes a number of classes of which the hierarchy seems to be very relevant. Thus, a number of classes is involved which I need to sort out first. If you have any hint on what I should particulary look for, then I could possibly create an example more quickly. The trace indicates presence of a down cast expression to a parameterized type (where the cast type is ill-formed due to bug in compiler). The cast type is found as a binary, which could indicate a type from a library or any other type previously compiled in incremental build situation. Normally, a binary parameterized type is not directly referenced as BinaryTypeBinding, since all accesses should have been resulting in either ParameterizedTypeBinding creation, or raw conversion. We seem to have a path where a direct BinaryTypeBinding gets surfaced, causing the stack trace to occur (i.e. failure would be expected). Created attachment 103509 [details]
Simple project to reproduce InternalCompiler error
Ok, I found a simple example. Unfortunately, it has the problem, that the error only occurs "occasionally" - but at least I know how to reproduce - I hope, it will be reproducible on your machines as well.
The class "InternalCompilerError_Main" is where the error occurs.
The "funny" part is, that I can "turn it on or off": If I open the InternalCompilerError_Main class in eclipse, add a space somewhere, press Save (Auto Building is turned on), the error disappears. If I do it again, it re-appears.
In my "real project", the error is always present.
Please tell me, if you're not able to reproduce with that project...
Kay - could you try to reproduce with 3.4RC3 ? This could be a dup of bug 231861 (i.e. another symptom of this same bug). I could reproduce it with RC1, and not with RC3. The fix for bug 231861 addresses this symptom as well. Added GenericTypeTest#test1338, which fails with jdt/core v_865, and passes with post RC2 versions. *** This bug has been marked as a duplicate of bug 231861 *** Steps can be reproduced with batch compiler only: 1- compile first Derived_A.java and Derived_B.java 2- compile InternalCompilerError_Main.java against the classfiles produced in (1) or in IDE, incrementally compile InternalCompilerError_Main (add a space and build) BTW - Kay: thanks for the quick testcase Can confirm: Compiler error has vanished with RC3 - thanks a lot! Regression test is actually GenericTypeTest#test1340 Verified during 3.5M2 milestone verification process... |