File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -4972,7 +4972,7 @@ f(x) = yt(x)
4972
4972
(if value (error " misplaced \" global\" declaration" ))
4973
4973
(if (or (length= e 2 ) (atom? (caddr e))) (emit e)
4974
4974
(let ((rr (make-ssavalue)))
4975
- (emit `(= ,rr ,(caddr e)))
4975
+ (emit `(= ,rr ,(compile ( caddr e) break-labels #t #f )))
4976
4976
(emit `(globaldecl ,(cadr e) ,rr))))
4977
4977
(if (null? (cadr lam))
4978
4978
(emit `(latestworld))))
Original file line number Diff line number Diff line change @@ -4237,6 +4237,16 @@ end
4237
4237
@test letf_57470 (3 ) == 5
4238
4238
@test letT_57470 === Int64
4239
4239
4240
+ end # M57470_sub
4241
+
4242
+ # lowering globaldecl with complex type
4243
+ module M58609
4244
+ using Test
4245
+ global x:: T where T
4246
+ global y:: Type{<:Number}
4247
+
4248
+ @test Core. get_binding_type (M58609, :x ) === Any
4249
+ @test Core. get_binding_type (M58609, :y ) == Type{<: Number }
4240
4250
end
4241
4251
4242
4252
# #57574
You can’t perform that action at this time.
0 commit comments