Skip to content

Commit

Permalink
Merge pull request #493 from manuelbb-upb/patch-1
Browse files Browse the repository at this point in the history
`promote_symtype` for `Base.literal_pow`
  • Loading branch information
shashi authored Apr 24, 2023
2 parents b445da3 + 71676f6 commit 6be690c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ function Base.literal_pow(::typeof(^), x::Symbolic, ::Val{p}) where {p}
T = symtype(x)
T <: Number ? Base.:^(x, p) : error_f_symbolic(rem2pi, T)
end
function promote_symtype(::typeof(Base.literal_pow), _, ::Type{T}, ::Type{Val{S}}) where{T<:Number,S}
return promote_symtype(^, T, typeof(S))
end

promote_symtype(::Any, T) = promote_type(T, Real)
for f in monadic
Expand Down

0 comments on commit 6be690c

Please sign in to comment.