abstract AbstractFoo
immutable Foo <: AbstractFoo end
import Base.+
+(::Foo,::Foo) = Foo()
A=fill(Foo(),10,10)
A+A
returns a Matrix{Any}, not Matrix{Foo} as expected.
Julia Version 0.5.0-dev+5122
Commit 2e1bcc6 (2016-07-03 00:01 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin15.5.0)
CPU: Intel(R) Core(TM) i7-3820QM CPU @ 2.70GHz
WORD_SIZE: 64
BLAS: libgfortblas
LAPACK: liblapack
LIBM: libopenlibm
LLVM: libLLVM-3.7.1 (ORCJIT, ivybridge)