Skip to content

0.5 Adding matrices of special type incorrectly promoted to Matrix{Any} #17254

@dlfivefifty

Description

@dlfivefifty
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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions