Mercurial > projects > dstress
view run/m/mixin_16_D.d @ 1576:b3e16c86558e
[Issue 1398] New: GDC doesn't generate correct code
<mariusmuja@gmail.com>
2007-08-04
http://d.puremagic.com/issues/show_bug.cgi?id=1398
author | thomask |
---|---|
date | Thu, 21 Feb 2008 15:20:08 +0000 |
parents | 902d2c168029 |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Chris Miller <chris@dprogramming.com> // @date@ 2006-01-30 // @uri@ news:op.s36xvez5po9bzi@moe // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=711 module dstress.run.m.mixin_16_D; int step; template Mixer(){ char test(){ assert(0); } } class Foo{ char test(){ if(step == 2){ step++; return 'F'; } } } class FooBar : Foo{ mixin Mixer; char test(){ if(step == 1){ step++; return super.test(); } } } int main(){ FooBar f = new FooBar; if(step == 0){ step++; if(f.test() == 'F'){ if(step == 3){ return 0; } assert(0); } assert(0); } }