Skip to content

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

@favba

Description

@favba

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions