Skip to content

undetected method ambiguity #12814

Closed
Closed
@SimonDanisch

Description

I ran into the following:

abstract FSV{N, T}
#works as expected when moved here
#Base.call{T <: FSV, X <: Array}(::Type{T}, x::X) = "excellent"
immutable Vec{N, T} <: FSV{N, T}
    x::NTuple{N, T}
end
Base.call{T <: FSV, X <: Array}(::Type{T}, x::X) = "excellent"

julia> Vec([1,2,3])
"excellent"
julia> Vec{3, Float32}([1,2,3])
ERROR: MethodError: `convert` has no method matching convert(::Type{Tuple{Float32,Float32,Float32}}, ::Array{Int64,1})
julia> versioninfo()                                                                                     
Julia Version 0.4.0-dev+6945                                                                             
Commit 90346c1 (2015-08-24 19:21 UTC)                                                                    
Platform Info:                                                                                           
  System: Windows (x86_64-w64-mingw32)                                                                   
  CPU: Intel(R) Core(TM) i3-4130 CPU @ 3.40GHz                                                           
  WORD_SIZE: 64                                                                                          
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)                                       
  LAPACK: libopenblas                                                                                    
  LIBM: libopenlibm                                                                                      
  LLVM: libLLVM-3.3                                                                                                                                                                                           

@yuyichao comments: probably not #265 but similar

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    types and dispatchTypes, subtyping and method dispatch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions