Skip to content

Commit

Permalink
inference: TypeVar == 1 is a useful base case to allow in recursion
Browse files Browse the repository at this point in the history
(e.g. reinterpret to a Vector)
  • Loading branch information
vtjnash committed May 24, 2017
1 parent 59bd6f3 commit ce1d03c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions base/inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,8 @@ function type_more_complex(t::ANY, c::ANY, sources::SimpleVector)
end
elseif t === c
return false
elseif isa(t, Int) && isa(c, Int)
return t === 1 # alternatively: 0 <= t < c
end
return true
end
Expand Down

0 comments on commit ce1d03c

Please sign in to comment.