Mixin Template: cannot mixin scope(exit)?

mist none at none.none
Mon Jan 14 02:44:19 PST 2013


>>
>> 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?


More information about the Digitalmars-d-learn mailing list