Open deadalnix opened 9 years ago
It is illegal now ?
Also please post minimal sample code to repro the issue when doing a bug report, otherwize things become quickly untractable.
From @schancel on October 3, 2014 3:43
Yes, see the last paragraph of http://dlang.org/statement.html#ScopeGuardStatement
Minimal code:
int main() {
scope(exit) return -1;
return 0;
}
dmd produces: testie.d(2): Error: return statements cannot be in scope(exit) bodies
Well that is new, it was allowed when I implemented this. Anyway, I don't think this is very important. It need to be addressed at some point, but me must focus on high impact changes.
From @UplinkCoder on October 3, 2014 8:42
@deadalnix @schancel maybe we could do some kind of TODO, in the wiki or so. Opening so much issues is a bit irritating. I just made a small ugly TODO page for the wiki please add stuff @schancel
From @schancel on October 3, 2014 3:29
See test0120, which currently passes.
Copied from original issue: deadalnix/libd#29