On 01/14/2013 04:44 AM, mist wrote:
It appears that you cannot mixin *any* statement with
scope([exit,success,etc]) in it.
I have been rereading my copy of TDPL, and it states that mixin
statements must be valid D code, and there can be multiple 'scope()'
statements.
Since "scope(exit) writeln();" is valid D code, and refuses to compile
in a mixin, I assume that this is a bug.
I've been digging through the bug tracker and I cannot find a duplicate
bug, so if someone can confirm that this is a bug, I'll create a report.
It is not a bug. Use a string mixin.
What is the rationale behind this limitation?
I too would like to know the reason behind the limitation...
My Code was nice and pretty incorrect.