diff --git a/base/compiler/tfuncs.jl b/base/compiler/tfuncs.jl index 8b52c6e216f0fe..9ab8f56d313923 100644 --- a/base/compiler/tfuncs.jl +++ b/base/compiler/tfuncs.jl @@ -1412,7 +1412,7 @@ function builtin_tfunction(interp::AbstractInterpreter, @nospecialize(f), argtyp end end return Any - elseif f === Expr + elseif f === Core._expr if length(argtypes) < 1 && !isva return Bottom end diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index 46046d65795773..95050f1179e759 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -2738,3 +2738,5 @@ f_generator_splat(t::Tuple) = tuple((identity(l) for l in t)...) @test (sizeof(Ptr),) == sizeof.((Ptr,)) == sizeof.((Ptr{Cvoid},)) @test Core.Compiler.sizeof_tfunc(UnionAll) === Int @test !Core.Compiler.sizeof_nothrow(UnionAll) + +@test Base.return_types(Expr) == Any[Expr]