JuliaLang/julia — Issue #271: in some cases we could get more from type declarations
Author: JeffBezanson
Created: 2011-12-01 02:34:30+00:00
State: open
Labels: performance

Currently type declarations are implemented with `convert`. The problem is, in a case like this

x = convert(Array{Float64,2}, ????)

there are so many matching convert methods that we can't infer the result type. We could either cheat and assume convert always returns something of the right type or, probably better, add a layer of `typeassert` to make sure convert returns the right thing in this case.