Mercurial > projects > dstress
view run/odd_bug_02.d @ 1383:52c9e86b6486
@url@ -> @uri@
author | thomask |
---|---|
date | Sun, 04 Mar 2007 13:07:35 +0000 |
parents | a33ad7189d21 |
children | 6e4063f99377 |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Ben Hinkle <bhinkle4@juno.com> // @date@ 2004-09-26 // @uri@ news:cj6g4d$9iv$1@digitaldaemon.com // @uri@ nntp://digitalmars.com/digitalmars.D.bugs/1953 module dstress.run.odd_bug_02; // @WARNING@: this code requires phobos import std.stdarg; struct TestStruct{ void add(...){ TestStruct other = va_arg!(TestStruct)(_argptr); foreach(int value; other){ foo(); } } void foo(){ assert(left is null); bar(); } void bar(){ assert(left is null); } int opApply(int delegate(inout int val) dg){ return 0; } void* left; } int main(){ TestStruct t; t.foo(); return 0; }