Skip to content

@goto in a catch skips finally #60972

@IanButterworth

Description

@IanButterworth

If not a bug, I think this is worth documenting. The finally isn't visited.

julia> function foo()
           try
              println(1)
              error()
           catch
              println(2)
              @goto here
           finally
              println(3)
           end
           @label here
           println(4)
           return :done
       end
foo (generic function with 1 method)

julia> foo()
1
2
4
:done

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions