Aladdin - Scala Bugtracking
[#755] project: compiler priority: low category: bug
submitter assigned to status date submitted
Nikolay Iulian fixed 2006-09-24 16:33:16.0
subject [contrib #207] Finally doesn't catch return
code
{ 
 var x = false;
 def f : unit = try { return } finally { x = true };
 f;
 x;
}
what happened
Returned false.
what expected Should return true. At least that is Java's behavior, and the Scala specification also says: "If evaluation of b does not cause an exception to be thrown, the expression e is evaluated."
[back to overview]
Changes of this bug report
Nikolay  edited on  2006-09-24 16:34:14.0
Transferred from the contributions and assigned to Iuli
Iulian  edited on  2006-09-25 17:38:26.0