Skip to content

Commit

Permalink
Fix builtin_tfunction for Core._expr (JuliaLang#37188)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters authored and simeonschaub committed Aug 29, 2020
1 parent 27dabde commit e1687c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion base/compiler/tfuncs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions test/compiler/inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]

0 comments on commit e1687c4

Please sign in to comment.