Bug 20827 – Spurious "has no `return` statement, but is expected to return a value" with labeled continue

Status
NEW
Severity
normal
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-05-12T21:44:53Z
Last change time
2024-12-13T19:08:37Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Vladimir Panteleev
Moved to GitHub: dmd#19704 →

Comments

Comment #0 by dlang-bugzilla — 2020-05-12T21:44:53Z
///////// 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`
Comment #1 by robert.schadek — 2024-12-13T19:08:37Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19704 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB