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

Spurious Ambiguity Warning #11367

Closed
Keno opened this issue May 20, 2015 · 4 comments
Closed

Spurious Ambiguity Warning #11367

Keno opened this issue May 20, 2015 · 4 comments

Comments

@Keno
Copy link
Member

Keno commented May 20, 2015

julia> abstract foo

julia> Base.convert{T<:foo}(::Type{BigInt},x::T) = x.val
Warning: New definition
    convert(Type{Base.GMP.BigInt}, T<:foo) at none:1
is ambiguous with:
    convert(Type{T}, T) at base.jl:43.
To fix, define
    convert(Type{Base.GMP.BigInt}, Base.GMP.BigInt)
before the new definition.

This shouldn't be an ambiguity because !(BigInt <: foo).

@timholy
Copy link
Sponsor Member

timholy commented May 20, 2015

This is probably #11136, and will probably be fixed by #11194. I didn't want to hit merge before Jeff gets a chance to look, but you could certainly test it.

@Keno
Copy link
Member Author

Keno commented May 20, 2015

I merged #11194 locally, but the problem persists.

@timholy
Copy link
Sponsor Member

timholy commented May 20, 2015

Rats. OK, I'll dig into it later (if no one beats me).

@yuyichao
Copy link
Contributor

I should add that #11136 is a overly simplified version (removing parametrized type) of the example on the mailing list and the mailing list example looks much more similar to your case here.

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