Skip to content

@interpret(x == 2) and @interpret(x) == 2 lead to different execution world ages #666

@timholy

Description

@timholy

function g_gf()
eval(:(z = 2))
return z
end
@test @interpret g_gf() == 2
is broken on Julia 1.12 and can be fixed by changing the test to @test @interpret(g_gf()) == 2. As much sense as I think that change makes, I decided to try to understand why this happens and only appeared now. It turns out that the error is thrown at
local theargs = $(esc(args))
, where we try to evaluate the arguments passed to the call, and for the current test the outer call is ==(g_gf(), 2). Thus it tries to Core.eval(Main, :(g_gf())), and this fails for reasons of world age.

Fundamentally this seems to be testing that JuliaInterpreter doesn't respect world ages properly. Should we ditch this test?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions