On 11/15/2012 06:40 PM, Ali Çehreli wrote:
b) The user wants to play safe:auto makeFoo() { Foo foo; foreach (i; 0..10) foo.add( /* new data point */ ); return foo; } void main() { immutable foo = makeFoo(); } Both of those compile with dmd 2.060.
Really? I'm using from-GitHub dmd, and with the above example I get a "cannot implicitly convert expression to immutable" error, e.g.:
Error: cannot implicitly convert expression (testSets(nfRaw,0.1L)) of type TestData!(ulong,ulong) to immutable(TestData!(ulong,ulong))
