File tree Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Original file line number Diff line number Diff line change 626626 @test n_avail (c) == 0
627627 end
628628end
629-
630- # Issue #49507: stackoverflow in type inference caused by close(::Channel, ::Exception)
631- @testset " close(::Channel, ::StackOverflowError)" begin
632- ch = let result = Channel ()
633- foo () = try
634- foo ()
635- catch e;
636- close (result, e)
637- end
638-
639- foo () # This shouldn't fail with an internal stackoverflow error in inference.
640-
641- result
642- end
643-
644- @test (try take! (ch) catch e; e; end ) isa StackOverflowError
645- end
Original file line number Diff line number Diff line change @@ -17,3 +17,20 @@ let exename = Base.julia_cmd()
1717 @show readchomperrors (` $exename -e "f() = f(); f()"` )
1818 @show readchomperrors (` $exename -e "f() = f(); fetch(@async f())"` )
1919end
20+
21+ # Issue #49507: stackoverflow in type inference caused by close(::Channel, ::Exception)
22+ @testset " close(::Channel, ::StackOverflowError)" begin
23+ ch = let result = Channel ()
24+ foo () = try
25+ foo ()
26+ catch e;
27+ close (result, e)
28+ end
29+
30+ foo () # This shouldn't fail with an internal stackoverflow error in inference.
31+
32+ result
33+ end
34+
35+ @test (try take! (ch) catch e; e; end ) isa StackOverflowError
36+ end
You can’t perform that action at this time.
0 commit comments