Mercurial > projects > dstress
diff run/bug_e2ir_141_C.d @ 216:17b5647d8463
structs/unions and setters/getters
Vathix <vathix@dprogramming.com>
2004-12-29
news:opsjr1fu1jkcck4r@tc3-ppp187.dialup.wzrd.com
nntp://digitalmars.com/digitalmars.D.bugs/2620
author | thomask |
---|---|
date | Wed, 29 Dec 2004 23:35:31 +0000 |
parents | |
children | ec6d35cccfb5 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/bug_e2ir_141_C.d Wed Dec 29 23:35:31 2004 +0000 @@ -0,0 +1,29 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Vathix <vathix@dprogramming.com> +// @date@ 2004-12-29 +// @uri@ news:opsjr1fu1jkcck4r@tc3-ppp187.dialup.wzrd.com +// @url@ nntp://digitalmars.com/digitalmars.D.bugs/2620 + +module dstress.run.bug_e2ir_141_C; + +class MyClass{ + static MyClass prop(){ + return dummy; + } + + static void prop(MyClass o){ + } +} + +MyClass dummy; + +int main(){ + dummy = new MyClass(); + MyClass c = new MyClass(); + c.prop = true ? MyClass.prop : MyClass.prop; + assert(c.prop === dummy); + return 0; +}