Re: dmd 2.068 deducing purity

2015-08-25 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/25/15 1:05 PM, Jack Applegame wrote: On Tuesday, 25 August 2015 at 14:05:17 UTC, Steven Schveighoffer wrote: Can you post an example? import std.range; import std.algorithm; class Foo { int baz() {return 1;} void bar() { auto s = [1].map!(i = baz()); // compiles

dmd 2.068 deducing purity

2015-08-25 Thread Jack Applegame via Digitalmars-d-learn
Using lambdas in 2.068 becomes painful: import std.algorithm; struct Foo { int baz(int v) { static int id; return v + id++; } void bar() { auto arr1 = [1, 2, 3]; auto arr2 = [4, 5, 6];

Re: dmd 2.068 deducing purity

2015-08-25 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/25/15 9:59 AM, Jack Applegame wrote: Using lambdas in 2.068 becomes painful: import std.algorithm; struct Foo { int baz(int v) { static int id; return v + id++; } void bar() { auto arr1 = [1, 2, 3]; auto arr2 = [4, 5, 6]; arr1.map!(i =

Re: dmd 2.068 deducing purity

2015-08-25 Thread Jack Applegame via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 14:05:17 UTC, Steven Schveighoffer wrote: Can you post an example? import std.range; import std.algorithm; class Foo { int baz() { return 1;} void bar() { auto s = [1].map!(i = baz()); // compiles auto r = [1].map!(i =

Re: dmd 2.068 deducing purity

2015-08-25 Thread Jack Applegame via Digitalmars-d-learn
On Tuesday, 25 August 2015 at 18:03:21 UTC, Steven Schveighoffer wrote: https://issues.dlang.org/show_bug.cgi?id=14962 -Steve Thanks.