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: [email protected]
Reporter: [email protected]
///////// 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`
--