Mercurial > projects > dstress
view run/t/template_62_A.d @ 1630:d0efa3ae5522 default tip
run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Sat, 23 Apr 2011 22:57:32 +0200 |
parents | 891196dcfc3a |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Tomasz Stachowiak <h3r3tic@mat.uni.torun.pl> // @date@ 2007-03-19 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1068 // @desc@ [Issue 1068] stack corruption with mixins and function templates // __DSTRESS_DFLAGS__ run/t/template_62_B.d module /*dstress.*/run.t.template_62_A; template Mix() { static void foobar() { auto context = new Context; context.func!(typeof(this))(); } } class Bar { mixin Mix!(); } void someFunc(char[] z) { if(1 != z.length){ assert(0); } if("a" != z){ assert(0); } } class Context { void func(T)() { someFunc(`a`); } }