diff --git a/src/interpreter.c b/src/interpreter.c index 008886f1c99c9..b9e282a0fba19 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -236,7 +236,8 @@ static jl_value_t *eval_value(jl_value_t *e, interpreter_state *s) } } else { - assert(0 && "malformed isdefined expression"); + // QuoteNode or other implicitly quoted object + defined = 1; } return defined ? jl_true : jl_false; } diff --git a/test/interpreter.jl b/test/interpreter.jl index 0fea42e0aecdb..f3e9ee2bcae65 100644 --- a/test/interpreter.jl +++ b/test/interpreter.jl @@ -30,3 +30,11 @@ let p = Pipe(), wait(proc) close(p) end + +# interpreting Expr(:isdefined, ::QuoteNode) +let code = """ + @generated f() = Expr(:isdefined, QuoteNode(Float64)) + f() + """ + @test read(`$(Base.julia_cmd()) --startup-file=no --compile=min -E $code`, String) == "true\n" +end