For Julia to infer types it needs to know the exact type of the
function. Try this:
type Foo{F<:Function}
f::F
y::Array{Float64, 1}
x::Array{Float64, 2}
end
On Fri, 2016-10-14 at 13:26, Giuseppe Ragusa wrote:
> I am failing to understand why the following code
I am failing to understand why the following code produce type instability
(caveat: the code is a reduction o large and more complex code, but the
features are the same).
```
type Foo
f::Function
y::Array{Float64, 1}
x::Array{Float64, 2}
end
type Bar{T}
b::T
end
type A{T}
a::T