Scala Programming Language
  1. Scala Programming Language
  2. SI-7181

Finally blocks are duplicated for each exception handler

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.0
    • Fix Version/s: Scala 2.11.0-M2
    • Component/s: None
    • Labels:
      None

      Description

      The main body of a try and each exception handler are getting a copy of the finally block for the "normal" flow case (i.e. where they don't throw an uncaught exception or use "return" to exit early). But that's not necessary. The try body and each exception handler can all share the same normal exit path through the same copy of the finally block.

        Issue Links

          Activity

          Show
          James Iry added a comment - https://github.com/scala/scala/pull/2169

            People

            • Assignee:
              James Iry
              Reporter:
              James Iry
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development