Ambiguity warnings are displayed funny (because of tupocalypse?)

150 views
Skip to first unread message

Tomas Lycken

unread,
Apr 24, 2015, 4:46:26 AM4/24/15
to juli...@googlegroups.com

I just noticed that ambiguity warnings are shown in a way that I suspect is unintentional:

julia> using Interpolations # with a bunch of WIP
Warning: New definition 

    getindexTuple{Interpolations.ConstantExtrapolation{T,N,ITP,Interpolations.OnGrid},Vararg{Any}} at /home/tlycken/.julia/v0.4/Interpolations/src/extrapolation/extrapolation.jl:39
is ambiguous with: 
    getindexTuple{Interpolations.ConstantExtrapolation{T,N,ITP,GT},Real} at /home/tlycken/.julia/v0.4/Interpolations/src/extrapolation/extrapolation.jl:31.
To fix, define 
    getindexTuple{Interpolations.ConstantExtrapolation{T,N,ITP,Interpolations.OnGrid},Real}
before the new definition.

Shouldn’t all the getindexTuple{...} really be getindex(...), and Vararg{Any} be Any...?

I did look for an issue for this without finding anything, but I’m not sure my issue search-fu is that great, so I thought I’d check here before filing anything. (I also had some trouble creating a minimal example that causes ambiguity warnings…)

// T

Yichao Yu

unread,
Apr 24, 2015, 8:00:07 AM4/24/15
to juli...@googlegroups.com
I guess it is a bug

```
julia> f(a, b::Int) = 1
f (generic function with 1 method)

julia> f(a::Int, b) = 1
Warning: New definition
fTuple{Int64,Any} at none:1
is ambiguous with:
fTuple{Any,Int64} at none:1.
To fix, define
fTuple{Int64,Int64}
before the new definition.
f (generic function with 2 methods)
```

>
> // T

Yichao Yu

unread,
Apr 24, 2015, 8:31:19 AM4/24/15
to juli...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages