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

Package ambiguity #66

Closed
RomainBrault opened this issue Feb 24, 2016 · 1 comment
Closed

Package ambiguity #66

RomainBrault opened this issue Feb 24, 2016 · 1 comment

Comments

@RomainBrault
Copy link
Contributor

Hello,

There is a ambiguity with the package measure.jl:

WARNING: New definition 
    *(#T<:Any, Type{Measures.Length{:cx, T<:Any}}) at /Users/Romain/.julia/v0.4/Compose/src/measure.jl:13
is ambiguous with: 
    *(IterativeSolvers.AbstractMatrixFcn, Any) at /Users/Romain/.julia/v0.4/IterativeSolvers/src/common.jl:118.
To fix, define 
    *(_<:IterativeSolvers.AbstractMatrixFcn, Type{Measures.Length{:cx, T<:Any}})
before the new definition.
WARNING: New definition 
    *(#T<:Any, Type{Measures.Length{:cy, T<:Any}}) at /Users/Romain/.julia/v0.4/Compose/src/measure.jl:14
is ambiguous with: 
    *(IterativeSolvers.AbstractMatrixFcn, Any) at /Users/Romain/.julia/v0.4/IterativeSolvers/src/common.jl:118.
To fix, define 
    *(_<:IterativeSolvers.AbstractMatrixFcn, Type{Measures.Length{:cy, T<:Any}})

Br,

Romain.

@jiahao
Copy link
Contributor

jiahao commented Feb 24, 2016

Unfortunately I don't think it's possible to fix this problem in this current version of Julia. IterativeSolvers cannot express the required interface of the linear operator as a type constraint within the current type system. Instead, we would require a mechanism like traits (JuliaLang/julia#13222) or interfaces (JuliaLang/julia#6975), either of which would be a worthy software design experiment to try out.

Another possibility that has been discussed is to turn ambiguity warnings into run time errors (c.f. JuliaLang/julia#6190), which would only affect users that tried to call ambiguous methods.

@jiahao jiahao closed this as completed Feb 24, 2016
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

No branches or pull requests

2 participants