Skip to content
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

Method ambiguity for promote_rule(Type{Boo},::Type{Basic}) #146

Open
favba opened this issue Oct 18, 2018 · 0 comments · May be fixed by #260
Open

Method ambiguity for promote_rule(Type{Boo},::Type{Basic}) #146

favba opened this issue Oct 18, 2018 · 0 comments · May be fixed by #260

Comments

@favba
Copy link

favba commented Oct 18, 2018

Using SymEngine v0.4.3

julia> versioninfo()
Julia Version 1.0.1
Commit 0d713926f8 (2018-09-29 19:05 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin14.5.0)
  CPU: Intel(R) Core(TM) i5-5287U CPU @ 2.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, broadwell)
Environment:
  JULIA_NUM_THREADS = 2

julia> @vars a
(a,)

julia> a + true
ERROR: MethodError: promote_rule(::Type{Bool}, ::Type{Basic}) is ambiguous. Candidates:
  promote_rule(::Type{S}, ::Type{Basic}) where S<:Number in SymEngine at /Users/felipeavba/.julia/packages/SymEngine/sh7Yz/src/types.jl:97
  promote_rule(::Type{Bool}, ::Type{T}) where T<:Number in Base at bool.jl:4
Possible fix, define
  promote_rule(::Type{Bool}, ::Type{Basic})
Stacktrace:
 [1] promote_type at ./promotion.jl:221 [inlined]
 [2] _promote at ./promotion.jl:260 [inlined]
 [3] promote at ./promotion.jl:284 [inlined]
 [4] +(::Basic, ::Bool) at ./promotion.jl:313
 [5] top-level scope at none:0
@fatteneder fatteneder linked a pull request Apr 6, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant