diff --git a/test/stacktraces.jl b/test/stacktraces.jl index 8f2400662f0f08..5987d79e37bc93 100644 --- a/test/stacktraces.jl +++ b/test/stacktraces.jl @@ -124,3 +124,12 @@ let ctestptr = cglobal((:ctest, "libccalltest")), @test ctest[1].from_c @test ctest[1].pointer === UInt64(ctestptr) end + +# #19655 +let + # not in a `catch`, so should return an empty StackTrace + st = stacktrace(empty!(backtrace())) + println(st) + @test isempty(st) + @test isa(st, StackTrace) +end