[Issue 444] New: Inside a foreach with delegates, void return does not compile
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 19 22:55:33 PDT 2006
http://d.puremagic.com/issues/show_bug.cgi?id=444
Summary: Inside a foreach with delegates, void return does not
compile
Product: D
Version: 0.172
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: kinaba at is.s.u-tokyo.ac.jp
void main()
{
int nothing( int delegate(inout int) dg ) {return 0;}
foreach(int x; ¬hing)
return;
}
issues an error on dmd 0.172 (without line number info):
cannot implicitly convert expression (0) of type int to void
--
More information about the Digitalmars-d-bugs
mailing list