Re: Warning: statement is not reachable

2016-03-02 Thread Tamas via Digitalmars-d-learn
On Wednesday, 2 March 2016 at 09:37:03 UTC, Johan Engelen wrote: On Wednesday, 2 March 2016 at 07:42:09 UTC, Tamas wrote: Thanks, fixing this single issue solved the compiler crash too. Did the compiler crash? Or just exit? (a crash would still be a bug) Crashed, just like in the case of

Re: Warning: statement is not reachable

2016-03-02 Thread Johan Engelen via Digitalmars-d-learn
On Wednesday, 2 March 2016 at 07:42:09 UTC, Tamas wrote: Thanks, fixing this single issue solved the compiler crash too. Did the compiler crash? Or just exit? (a crash would still be a bug)

Re: Warning: statement is not reachable

2016-03-02 Thread Tamas via Digitalmars-d-learn
Thanks, fixing this single issue solved the compiler crash too. Thanks also for the tip using hasUDA! Works nicely!

Re: Warning: statement is not reachable

2016-03-02 Thread ag0aep6g via Digitalmars-d-learn
On 01.03.2016 22:30, Tamas wrote: struct Tag {} template isTagged(S) { enum bool isTagged = delegate() { foreach(attr; __traits(getAttributes, S)) { static if (is(attr == Tag)) { return true; } }

Re: Warning: statement is not reachable

2016-03-02 Thread Edwin van Leeuwen via Digitalmars-d-learn
On Tuesday, 1 March 2016 at 21:30:44 UTC, Tamas wrote: foreach(attr; __traits(getAttributes, S)) { static if (is(attr == Tag)) { return true; } } return false; }(); } void main() { static @Tag struct

Re: Warning: statement is not reachable

2016-03-02 Thread Edwin van Leeuwen via Digitalmars-d-learn
On Tuesday, 1 March 2016 at 21:30:44 UTC, Tamas wrote: My d code doesn't compile using ldc2 1.0.0-alpha or anything above DMD v2.068.0 Using these compilers I get a lot of "Warning: statement is not reachable". Then the both compiler crashes. ldc2 -w reach.d dmd -w reach.

Warning: statement is not reachable

2016-03-02 Thread Tamas via Digitalmars-d-learn
My d code doesn't compile using ldc2 1.0.0-alpha or anything above DMD v2.068.0 Using these compilers I get a lot of "Warning: statement is not reachable". Then the both compiler crashes. I minimized the code to get the same warning, although the compilers do not crash thi