Skip to content

Commit

Permalink
remove an unnecessary promote_type definition
Browse files Browse the repository at this point in the history
this also gives a better no-method error for invalid 2-argument calls
  • Loading branch information
JeffBezanson committed Dec 14, 2014
1 parent 1666552 commit dc7ce61
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions base/promotion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ end

promote_type() = Bottom
promote_type(T) = T
promote_type(T, S ) = typejoin(T, S)
promote_type(T, S...) = promote_type(T, promote_type(S...))
promote_type(T, S, U, V...) = promote_type(T, promote_type(S, U, V...))

promote_type(::Type{Bottom}, ::Type{Bottom}) = Bottom
promote_type{T}(::Type{T}, ::Type{T}) = T
Expand Down

0 comments on commit dc7ce61

Please sign in to comment.