Summary: | [Compiler] invalid byte code produced when catching Throwable | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Steve Loker <sloker> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | P3 | CC: | eclipse |
Version: | 3.0 | ||
Target Milestone: | 3.0 M9 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Steve Loker
2004-04-07 11:00:33 EDT
Problem comes from invalid implicit conversion for well-known types. The id for Throwable is 21, and fools the implicit conversion computation since it is confused with boolean as per lower 4 bits. Implicit computation should check for id before doing bit manipulations in AssertStatement#resolve. Fix: switch(id) { case T_void : scope.problemReporter ().illegalVoidExpression(exceptionArgument); default: id = T_Object; case T_boolean : case T_byte : case T_char : case T_short : case T_double : case T_float : case T_int : case T_long : case T_String : exceptionArgument.implicitConversion = (id << 4) + id; } Added AssertionTest#test012 Backported with test to 2.1.x stream *** Bug 60040 has been marked as a duplicate of this bug. *** Verified in 200405180816 |