Mercurial > projects > dstress
view run/alias_04.d @ 1:3414705c41ac
removed CVS header
author | thomask |
---|---|
date | Sun, 26 Sep 2004 12:06:09 +0000 |
parents | 3269e4627918 |
children | f87ba6507260 |
line wrap: on
line source
class A { int foo(int a) { return 1; } } class B : A { int foo( int a, uint b ) { return 2; } } class C : B { int foo( int a ) { return 3; } alias B.foo foo; } class D : C { } int main(){ D d = new D(); assert(d.foo(1, 2u) == 2); // calls B.foo assert(d.foo(1) == 3); // calls C.foo return 0; }