| Summary: | [1.7][compiler] Failure in computing precisely rethrown types. | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Srikanth Sankaran <srikanth_sankaran> |
| Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | amj87.iitr, Olivier_Thomann |
| Version: | 3.7 | ||
| Target Milestone: | 3.7.1 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Srikanth Sankaran
Another related problem:
The following code fails to compile with source level 1.6 and
compliance level 1.7. I think precise rethrow semantics should
be keyed off of (i.e trigger with) the source level and not
compliance level.
public class X {
public static void main(String[] args) {
try {
throw new DaughterOfFoo();
} catch(Foo e) {
try {
throw e;
} catch (SonOfFoo e1) {
e1.printStackTrace();
} catch (Foo e1) {}
}
}
}
class Foo extends Exception {}
class SonOfFoo extends Foo {}
class DaughterOfFoo extends Foo {}
Patch posted at https://bugs.eclipse.org/bugs/show_bug.cgi?id=340022#c5 fixes this issue and has a junit also. > Patch posted at https://bugs.eclipse.org/bugs/show_bug.cgi?id=340022#c5 > fixes this issue and has a junit also. Resolved by the patch posted at (released into BETA_JAVA7 branch) https://bugs.eclipse.org/bugs/show_bug.cgi?id=340022#c8 Verified. |