Mercurial > projects > dstress
view run/w/with_15_C.d @ 1619:bebc7472a832
Fix #7.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 07 Nov 2009 18:55:30 +0100 |
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_C; class Base{ int data; void foo(int i){ data = i; } int foo(){ return data; } } class Derived : Base{ override void foo(int i){ super.data = 2 * i; } alias Base.foo foo; } int main(){ Derived d = new Derived(); d.foo(3); with(d){ if(foo != 6){ assert(0); } } return 0; }