Skip to content

Commit

Permalink
A hack to not run typejoin so much, relates to tonyhffong#242.
Browse files Browse the repository at this point in the history
  • Loading branch information
ikirill committed Sep 5, 2017
1 parent 8932ba4 commit 04da125
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/statictype.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ function infertype(f, argtypes::Tuple)
Core.Inference.return_type(convert, Tuple{Type{f}, argtypes[1]})
else
try
typejoin(Base.return_types(f, Tuple{argtypes...})...)
# @show Base.return_types(f, Tuple{argtypes...})
# @time typejoin(Base.return_types(f, Tuple{argtypes...})...)
t = Base.return_types(f, Tuple{argtypes...})
Any t ? Any : typejoin(t...)
catch # error might be thrown if generic function, try using inference
if all(isleaftype, argtypes)
Core.Inference.return_type(f, Tuple{argtypes...})
Expand Down

0 comments on commit 04da125

Please sign in to comment.