Mercurial > projects > dstress
diff run/forward_reference_08.d @ 235:a6ffcb7cfc2b
forward reference of enums
Stewart Gordon <smjg_1998@yahoo.com>
2005-01-12
news:cs2t3t$1700$2@digitaldaemon.com
nntp://news.digitalmars.com/digitalmars.D.bugs/2673
author | thomask |
---|---|
date | Wed, 12 Jan 2005 13:43:49 +0000 |
parents | |
children | 52c9e86b6486 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/forward_reference_08.d Wed Jan 12 13:43:49 2005 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Stewart Gordon <smjg_1998@yahoo.com> +// @date@ 2005-01-12 +// @uri@ news:cs2t3t$1700$2@digitaldaemon.com +// @url@ nntp://news.digitalmars.com/digitalmars.D.bugs/2673 + +module dstress.run.forward_reference_08; + +struct MyStruct{ + MyEnum e; +} + +enum MyEnum{ + A=19, + B +} + +int main(){ + MyStruct s; + assert(s.e==MyEnum.A); + return 0; +}