Skip to content

Commit 7ca634a

Browse files
authored
Fix MethodError in IR validator (#58425)
1 parent 43ead47 commit 7ca634a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Compiler/src/validation.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ const VALID_EXPR_HEADS = IdDict{Symbol,UnitRange{Int}}(
3535
:aliasscope => 0:0,
3636
:popaliasscope => 0:0,
3737
:new_opaque_closure => 5:typemax(Int),
38-
:import => 1:typemax(Int),
39-
:using => 1:typemax(Int),
4038
:export => 1:typemax(Int),
4139
:public => 1:typemax(Int),
4240
:latestworld => 0:0,
@@ -72,11 +70,13 @@ function maybe_validate_code(mi::MethodInstance, src::CodeInfo, kind::String)
7270
if !isempty(errors)
7371
for e in errors
7472
if mi.def isa Method
75-
println(stderr, "WARNING: Encountered invalid ", kind, " code for method ",
76-
mi.def, ": ", e)
73+
println(Core.stderr,
74+
"WARNING: Encountered invalid ", kind,
75+
" code for method ", mi.def, ": ", e)
7776
else
78-
println(stderr, "WARNING: Encountered invalid ", kind, " code for top level expression in ",
79-
mi.def, ": ", e)
77+
println(Core.stderr,
78+
"WARNING: Encountered invalid ", kind,
79+
" code for top level expression in ", mi.def, ": ", e)
8080
end
8181
end
8282
error("")

0 commit comments

Comments
 (0)