digitalmars.D.bugs - [Issue 18605] New: False unreachable warning generated when labeled
- d-bugmail puremagic.com (28/28) Mar 13 2018 https://issues.dlang.org/show_bug.cgi?id=18605
https://issues.dlang.org/show_bug.cgi?id=18605 Issue ID: 18605 Summary: False unreachable warning generated when labeled continue is used Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: yshuiv7 gmail.com Code example: auto test(T...)(int t) { L:foreach(_; T) { if (t) continue L; return 1; } new int; // <-- reported as unreachable } int _() { return test!(1,2,3)(1); } While in reality the reachability of 'new int' is dependent on parameter 't'. --
Mar 13 2018