Mercurial > projects > dstress
view run/w/with_15_A.d @ 1586:a74f0139fc3d
Fix tests using typeof on types.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Thu, 21 Aug 2008 15:42:21 +0200 |
parents | daef239f37cf |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Chris Miller <chris@dprogramming.com> // @date@ 2006-09-06 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=325 // @desc@ [Issue 325] New: Overriding members and overloading with alias causes bogus error messages in with(). module dstress.run.w.with_15_A; class Base{ int data; void foo(int i){ data = i; } int foo(){ return data; } } class Derived : Base{ alias Base.foo foo; override void foo(int i){ super.data = 2 * i; } } int main(){ Derived d = new Derived(); with(d){ foo = 1; } if(d.foo() != 2){ assert(0); } return 0; }