Mercurial > projects > dstress
view run/c/catch_05_F.d @ 697:fbee62becd2c
partial repos review
author | thomask |
---|---|
date | Mon, 03 Oct 2005 09:59:08 +0000 |
parents | 6ee3b4b671c1 |
children | f4e98d870b57 |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Nick <Nick_member@pathlink.com> // @date@ 2005-06-21 // @uri@ news:d99id2$fgj$1@digitaldaemon.com // @desc@ foreach and throw/catch code generation module dstress.run.c.catch_05_F; int counter; void dummy(...){ counter++; } int bb[char[]]; int main(){ assert(counter==0); foreach(int i; bb){ dummy(i); } assert(counter==0); bb["a"] = 1; foreach(int b; bb){ try{ throw new Error("foo"); }catch(Error e){ assert(e); assert(counter==0); return 0; }catch{ assert(0); } assert(0); } assert(0); }