[Issue 11220] Regression in master: XXX__lambda2 cannot access frame of function XXX
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 10 21:29:12 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11220
--- Comment #6 from Walter Bright <bugzilla at digitalmars.com> 2013-10-10 21:29:11 PDT ---
If I write it this way:
int parsePrimaryExpression(int x) {
parseAmbiguous!( (parsed){ x += 1; } )();
return 1;
}
template parseAmbiguous(alias handler)
{
typeof(handler(1))
//void
parseAmbiguous() {
return handler(1);
}
}
We can see that instantiating handler(1) outside the function parseAmbiguous()
is what causes the error, because it needs the frame of parseAmbiguous().
--
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