cristicbz/scid — Issue #80: Column-wise ops + immutable == error
Author: dsimcha
Created: 2011-12-20 14:17:44+00:00
State: open

This one may not be worth fixing because proposed changes to how IFTI works w.r.t. primitives may automatically solve the problem, but I want it to be in the issue tracker anyhow.

import scid.matrix;

void main() {
auto mat = matrix([[1.0, 2, 3], [4.0, 5, 6]]);
immutable num = 2.0;
mat[][0] += num;
}

scid\ops\expression.d(403): Error: static assert "Types 'immutable(double)' and 'immutable(double)' do not define a promotion. "
scid\ops\expression.d(376): instantiated from here: PromotionImpl!(immutable(double),immutable(double))
scid\ops\eval.d(46): instantiated from here: Promotion!(immutable(double),immutable(double))
scid\storage\constant.d(32): instantiated from here: eval!(immutable(double))
... (1 instantiations, -v to show) ...
scid\matrix.d(574): instantiated from here: opSliceOpAssign!(op,immutable(double))
test9.d(38): instantiated from here: opIndexOpAssign!("+",immutable(double))