Hi there,

I expect the code (yes, still playing around with automatic 
differentiation...)

immutable Dual{T,ndim}

        x  :: T

        dx :: Array{T,ndim}

end


function di(a,s)

        b    = zeros(s...)

        return Dual(a,b)

        #       return Dual(a,[a]) # works as expected

end


c = di(3.,(2,3))

typeof(c)

to print

Dual{Float64,2}

But in Julia 0.2 (I believe.  What I use for sure is Julia Studio 0.4.4 on 
a 64 bit Windows 7 PC) it returns

Nothing (constructor with 1 method)

which I find peeving.  Note the line I commented out: if I uncomment it and 
comment the preceding one, I get the expected behaviour.  

What did I miss?

Philippe

Reply via email to