From bf833b61b9c6fd3b7bc17af1bd6b296fc5ab37fa Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Tue, 26 Mar 2024 20:18:18 +0900 Subject: [PATCH] minor type stability update --- src/utils.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils.jl b/src/utils.jl index 636d21c5..6767ba10 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -200,7 +200,10 @@ function trim_toplevel!(bt) for (i, t) in enumerate(bt) sfs = StackTraces.lookup(t) for sf in sfs - if sf.func === Symbol("top-level scope") || (isa(sf.linfo, Core.MethodInstance) && isa(sf.linfo.def, Method) && ((sf.linfo::Core.MethodInstance).def::Method).module ∈ (JuliaInterpreter, LoweredCodeUtils, Revise)) + if sf.func === Symbol("top-level scope") || (let mi = sf.linfo + mi isa Core.MethodInstance && (let def = mi.def + def isa Method && def.module ∈ (JuliaInterpreter, LoweredCodeUtils, Revise) + end) end) itoplevel = i break end