From 57a9073954fbb04de0f9b88556f0f97309b4c7ae Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Tue, 12 Feb 2019 18:06:50 +0100 Subject: [PATCH] fix getproperty (#20) --- src/JuliaInterpreter.jl | 2 +- test/interpret.jl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/JuliaInterpreter.jl b/src/JuliaInterpreter.jl index 4e2b39b21c226..d49b25f8d3ec2 100644 --- a/src/JuliaInterpreter.jl +++ b/src/JuliaInterpreter.jl @@ -360,7 +360,7 @@ function determine_method_for_expr(expr; enter_generated = false) # Can happen for thunks created by generated functions if isa(f, Core.Builtin) || isa(f, Core.IntrinsicFunction) return nothing - elseif f === getproperty && allargs[2] <: Vararg + elseif f === getproperty && allargs[2] isa Type && allargs[2] <: Vararg return nothing # https://github.com/JuliaLang/julia/issues/30995 end return prepare_call(f, allargs; enter_generated=enter_generated) diff --git a/test/interpret.jl b/test/interpret.jl index 311c36ddc1b34..338ef87df9697 100644 --- a/test/interpret.jl +++ b/test/interpret.jl @@ -115,3 +115,5 @@ ex = quote end frame = JuliaInterpreter.prepare_toplevel(Main, ex) JuliaInterpreter.finish_and_return!(JuliaStackFrame[], frame, true) + +@test @interpret Base.Math.DoubleFloat64(-0.5707963267948967, 4.9789962508669555e-17).hi ≈ -0.5707963267948967 \ No newline at end of file