http://abc.comlab.ox.ac.uk/cgi-bin/bugzilla/show_bug.cgi?id=62
Summary: abc gives false "Missing return statement" error for
nested try-catch-finally code
Product: abc
Version: 1.1.0
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: AspectJ compiler
AssignedTo: abc-bugs@comlab.ox.ac.uk
ReportedBy: neil.ongkingco@keb.ox.ac.uk
The following code causes a false "Missing return statement" error in abc:
public class Main {
//Note: Compiles properly in abc if either finally clause is removed
//Only causes a problem when both try-catches have finally clauses
private int f(int x, int y) {
int ret = 0;
try {
ret = 10 / x;
try {
ret = ret / y;
return ret;
}
catch (Exception e) {
return ret;
}
finally {}
}
catch (Exception e) {
return ret;
}
finally {}
}
}
Have already tried compiling it using javac and jikes (works properly on both).
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Received on Tue Dec 6 11:17:57 2005
This archive was generated by hypermail 2.1.8 : Tue Dec 06 2005 - 11:30:08 GMT