[Issue 15166] [REG2.069-devel] spurious statement not reachable warning in static foreach loop

2015-10-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15166 Steven Schveighoffer changed: What|Removed |Added CC||schvei...@yahoo.com --- Comment #6 fr

[Issue 15166] [REG2.069-devel] spurious statement not reachable warning in static foreach loop

2015-10-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15166 Martin Nowak changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Issue 15166] [REG2.069-devel] spurious statement not reachable warning in static foreach loop

2015-10-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15166 --- Comment #4 from Martin Nowak --- A workaround is to use a variable. bool res = true; foreach (index, element; Group1.expand) { static if (!is(Group1.expand[index] == Group2.expand[index])) { res = false; break; } } re

[Issue 15166] [REG2.069-devel] spurious statement not reachable warning in static foreach loop

2015-10-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15166 --- Comment #3 from Martin Nowak --- I think something along this line could work. override void visit(ConditionalStatement s) { if (s.condition.include(null, null)) { result = s.ifbody.blockExit(func, mustNotThrow); // mark

[Issue 15166] [REG2.069-devel] spurious statement not reachable warning in static foreach loop

2015-10-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15166 --- Comment #2 from Martin Nowak --- This is as annoying as go's stupid "unused variable" warning, at least during development. > I'm not sure how we can "fix" this and issue 14835. I guess the fix would be to mark those returns as dependent on the

[Issue 15166] [REG2.069-devel] spurious statement not reachable warning in static foreach loop

2015-10-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15166 Kenji Hara changed: What|Removed |Added Summary|[Ref 2.069-devel] spurious |[REG2.069-devel] spurious |st