Skip to content

Commit bf4ac5f

Browse files
authored
Generalize haseval in tests (#50)
Fixes test-breakage due to JuliaLang/julia#37573
1 parent 6fb00b9 commit bf4ac5f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/codeedges.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ end
144144
src = frame.framecode.src
145145
edges = CodeEdges(src)
146146
# Mark just the load of Core.eval
147-
haseval(stmt) = isa(stmt, Expr) && JuliaInterpreter.hasarg(isequal(:eval), stmt.args)
147+
haseval(stmt) = (isa(stmt, Expr) && JuliaInterpreter.hasarg(isequal(:eval), stmt.args)) ||
148+
(isa(stmt, Expr) && stmt.head === :call && is_quotenode(stmt.args[1], Core.eval))
148149
isrequired = map(haseval, src.code)
149150
@test sum(isrequired) == 1
150151
isrequired[edges.succs[findfirst(isrequired)]] .= true # add lines that use Core.eval

0 commit comments

Comments
 (0)