We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
invokelatest
1 parent 2d423bf commit 1f2fcb4Copy full SHA for 1f2fcb4
src/transform/common.jl
@@ -72,8 +72,16 @@ function rewrite_debuginfo!(ir::IRCode)
72
for (i, stmt) in enumerate(ir.stmts)
73
type = stmt[:type]
74
annotation = type === nothing ? "" : " (inferred type: $type)"
75
- filename = Symbol("%$i = $(stmt[:inst])", annotation)
76
- lineno = LineNumberNode(1, filename)
+ # Work around showing functions requiring `invokelatest` queries
+ # that are problematic to execute from generated functions.
77
+ local filename
78
+ try
79
+ filename = Symbol("%$i = $(stmt[:inst])", annotation)
80
+ catch e
81
+ isa(e, UndefVarError) && continue
82
+ rethrow()
83
+ end
84
+ lineno = LineNumberNode(1, filename::Symbol)
85
stmt[:line] = insert_debuginfo!(ir.debuginfo, i, lineno, stmt[:line])
86
end
87
0 commit comments