Skip to content

Commit

Permalink
fix #1079
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Jul 23, 2012
1 parent 843664e commit c820e1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/quaternion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ convert{T}(::Type{Quaternion{T}}, z::Quaternion) =

promote_rule{T,S}(::Type{Complex{T}}, ::Type{Quaternion{S}}) =
Quaternion{promote_type(T,S)}
promote_rule{T,S}(::Type{Real{T}}, ::Type{Quaternion{S}}) =
promote_rule{S}(::Type{Bool}, ::Type{Quaternion{S}}) = Quaternion{S}
promote_rule{T<:Real,S}(::Type{T}, ::Type{Quaternion{S}}) =
Quaternion{promote_type(T,S)}

function show(z::Quaternion)
Expand Down

0 comments on commit c820e1c

Please sign in to comment.