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

Ambiguity warnings #6487

Closed
andreasnoack opened this issue Apr 10, 2014 · 4 comments
Closed

Ambiguity warnings #6487

andreasnoack opened this issue Apr 10, 2014 · 4 comments

Comments

@andreasnoack
Copy link
Member

I have just merged #6265. It provokes some ambiguity warnings that cannot be printed correctly. Cc: @JeffBezanson.

Warning: New definition 
    convert could not show value of type Tuple at linalg/ldlt.jl:9
is ambiguous with: 
    convert could not show value of type Tuple at linalg/ldlt.jl:8.
To fix, define 
    convert could not show value of type Tuple
before the new definition.
Warning: New definition 
    * could not show value of type Tuple at linalg/sparse.jl:128
is ambiguous with: 
    * could not show value of type Tuple at linalg/tridiag.jl:247.
To fix, define 
    * could not show value of type Tuple
@carlobaldassi
Copy link
Member

One of the warnings was spurious (a manifestation of bug #6383), the other was legitimate (it needed to specify what to do with Tridiagonal * Sparse).

About the second one, note that I resolved it in favour of the method defined in tridiagonal.jl, since that keeps the sparseness in the result, but a more efficient method could be written for that particular case.

@carlobaldassi
Copy link
Member

Oh and BTW a tip on how to debug these things: look at the lines printed in the warnings, and if the ambiguity is not obvious define a function with the same two signatures at the REPL, which will then print what other signature is needed to disambiguate.

@StefanKarpinski
Copy link
Sponsor Member

That's a good tip.

@andreasnoack
Copy link
Member Author

@carlobaldassi Thank you for fixing this and for the tip.

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

3 participants