Mercurial > projects > dstress
view run/opIndex_01.d @ 1330:f3f715978184
Georg Wrede <georg@iki.fi>
2007-01-07
mail:45A120F5.1050108@iki.fi
author | thomask |
---|---|
date | Sat, 13 Jan 2007 10:33:49 +0000 |
parents | 1e6afb94ce6d |
children | b8c0195059d9 |
line wrap: on
line source
// $HeadURI$ // $Author$ // $Date$ // @author@ Kevin Bealer <Kevin_member@pathlink.com> // @date@ 2005-04-24 // @uri@ news:d4ha7g$fuc$1@digitaldaemon.com module dstress.run.opIndex_01; struct Range{ int width(){ return 1; } } class Container { Range opIndex(int i){ return data[i]; } Range[2] data; } int main(){ Container ranges=new Container; if (ranges[0].width == 1){ return 0; } assert(0); }