[Issue 8595] New: typeof(return) inside opApply loop always int
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Aug 28 09:08:55 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8595
Summary: typeof(return) inside opApply loop always int
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: dsimcha at yahoo.com
--- Comment #0 from David Simcha <dsimcha at yahoo.com> 2012-08-28 09:08:52 PDT ---
Probably related to the way opApply works under the hood, as a delegate that
returns int.
struct OpApply {
int opApply(int delegate(ref int) dg) {
assert(0);
}
}
void main() {
doIt();
}
string doIt() {
foreach(elem; OpApply.init) {
pragma(msg, typeof(return)); // int, should be string
}
assert(0);
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list