Mercurial > projects > dstress
view run/m/mixin_16_A.d @ 1619:bebc7472a832
Fix #7.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 07 Nov 2009 18:55:30 +0100 |
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_A; int step; template Mixer(){ char test(){ if(step == 2){ step++; return 'M'; } } } class Foo{ char test(){ assert(0); } } class FooBar : Foo{ mixin Mixer mixer; char test(){ if(step == 1){ step++; return mixer.test(); } assert(0); } } int main(){ FooBar f = new FooBar; if(step == 0){ step++; if(f.test() == 'M'){ if(step == 3){ return 0; } assert(0); } assert(0); } }