BUG: bad mixin behavior

Sean Kelly sean at f4.ca
Fri Feb 24 11:32:40 PST 2006


Note that if I uncomment the printf line in main then the output is:

0
0

as it should be.


C:\code\d\bugs>type 147_1.d
import std.c.stdio;

template mix()
{
     int i;
     void print() { printf( "%i\n", i ); }
}

void main()
{
     mixin mix!();

     print();
     //printf( "%i\n", i );
}
C:\code\d\bugs>dmd 147_1.d
C:\bin\dmd\bin\..\..\dm\bin\link.exe 147_1,,,user32+kernel32/noi;

C:\code\d\bugs>147_1
4202539

C:\code\d\bugs>



More information about the Digitalmars-d-bugs mailing list