Got `Unreachable reached` error while using IRTools

pushfirst!(ir, IRTools.xcall(Base, :println, "hello, world")) works.

Though IRTools.xcall(Base, :println, "hello, world") returns an Expr whose representation is :(Base.println("hello, world")), it is not identified with :(Base.println("hello, world")):

julia> a=IRTools.xcall(Base, :println, "Hi")
:(Base.println("Hi"))

julia> b=:(Base.println("Hi"))
:(Base.println("Hi"))

julia> a.args[1], a.args[1] |> typeof
(:(Base.println), GlobalRef)

julia> b.args[1], b.args[1] |> typeof
(:(Base.println), Expr)
3 Likes