-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
promote_type
is not supposed to be overloaded
#3
Comments
@nsajko so I changed the definition as you suggested, but I actually got obscure ambiguity errors, which weren't present before. For example, can you suggest a workaround for this?
If I change from Base.promote_rule(::Type{Union{TinyNumber, HugeNumber}}, ::Type{T}) where {T} = T to Base.promote_rule(::Type{T}, ::Type{Union{TinyNumber, HugeNumber}}) where {T} = T I got another ambiguity error, but in tests
So as far as I understand overloading |
Don't use
Overloading |
No, that doesn't fully resolve the problem because separate methods were already defined earlier before you opened the issue. The requirement for additional methods for clamp(0.0, tiny, huge) Ideally, this should return a value of I also tried this implementation and it seems to work just fine, but this fix broke |
Several methods are added for
promote_type
insrc/TinyHugeNumbers.jl
. Xref JuliaLang/julia#54138The text was updated successfully, but these errors were encountered: