-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Description
Either there is a parametric knot in my head by now or there are problems with julias multiple dispatch and how it interacts with modules.
the following code snippet
module As
export aT, aTfunc
abstract aT{T1, T2}
function aTfunc{T1 <: Int64, T2}(bI::aT{T1, T2})
println("called aTfunc")
bfunc(bI)
end
end
module Bs
export bT, bfunc
using As
type bT <: aT{Int64, Float64}
c::Int64
end
function bfunc(bI::bT)
println("called bfunc")
end
end
using As, Bs
aTfunc(bT(5))
does not work in Commit 5f6c86c* (0.2.0-rc1+7).
while the same thing without modules
abstract aT{T1, T2}
type bT <: aT{Int64, Float64}
c::Int64
end
function aTfunc{T1 <: Int64, T2}(bI::aT{T1, T2})
println("called aTfunc")
bfunc(bI)
end
function bfunc(bI::bT)
println("called bfunc")
end
aTfunc(bT(5))
works as expected. I see what the technical reasons might be in the case with modules, still as far as I see it, multiple dispatch should work across module boundaries.
Metadata
Metadata
Assignees
Labels
No labels