File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed
Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -4443,8 +4443,8 @@ f(x) = yt(x)
44434443 (error "Attempt to jump into catch block")
44444444 (error (string "cannot goto label \"" lab "\" inside try/catch block"))))
44454445 (if (eq? (cdr s) dest-tokens)
4446- (cons (car s) l )
4447- (loop (cdr s) (cons (car s) l ))))))
4446+ (append l (car s))
4447+ (loop (cdr s) (append l (car s)))))))
44484448 (define (emit-return tail x)
44494449 (define (emit- x)
44504450 (let* ((tmp (if ((if (null? catch-token-stack) valid-ir-return? simple-atom?) x)
Original file line number Diff line number Diff line change @@ -3865,6 +3865,29 @@ end
38653865 end
38663866end
38673867
3868+ let src = Meta. @lower let
3869+ try
3870+ try
3871+ return 1
3872+ catch
3873+ end
3874+ finally
3875+ nothing
3876+ end
3877+ end
3878+ code = src. args[1 ]. code
3879+ for stmt in code
3880+ if Meta. isexpr (stmt, :leave ) && length (stmt. args) > 1
3881+ # Expr(:leave, ...) should list the arguments to pop from
3882+ # inner-most scope to outer-most
3883+ @test issorted (Int[
3884+ (arg:: Core.SSAValue ). id
3885+ for arg in stmt. args
3886+ ]; rev= true )
3887+ end
3888+ end
3889+ end
3890+
38683891# Test that globals can be `using`'d even if they are not yet defined
38693892module UndefGlobal54954
38703893 global theglobal54954:: Int
You can’t perform that action at this time.
0 commit comments