May 12, 2020 [Issue 20827] New: Spurious "has no `return` statement, but is expected to return a value" with labeled continue | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20827 Issue ID: 20827 Summary: Spurious "has no `return` statement, but is expected to return a value" with labeled continue Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P4 Component: dmd Assignee: nobody@puremagic.com Reporter: dlang-bugzilla@thecybershadow.net ///////// test.d ///////// int fun() { while (true) { loop: foreach (n; 0..10) continue loop; } } ////////////////////////// DMD says: Error: function `test.fun` has no `return` statement, but is expected to return a value of type `int` -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply