Mercurial > projects > dstress
view run/scope_01.d @ 1:3414705c41ac
removed CVS header
author | thomask |
---|---|
date | Sun, 26 Sep 2004 12:06:09 +0000 |
parents | 3269e4627918 |
children | 5f98d4a33d49 |
line wrap: on
line source
// @author@ J Anderson <REMOVEanderson@badmama.com.au> // @date@ 2004-01-05 // @uri@ news://c70jk9$off$1@digitaldaemon.com int check; class MyClass{ this(){ status=3; } void call(){ assert(status==3); s.test(); check+=5; } struct MyStruct{ void test(){ assert(status==3); status=4; check+=3; } } MyStruct s; int status; } int main(){ MyClass c = new MyClass(); assert(c.status==3); assert(check==0); c.call(); assert(c.status==4); assert(check==8); return 0; }