Mercurial > projects > dstress
annotate run/overload_19.d @ 413:ad4e3b6d6192
static / non-static overload
Kirs <fu@bar.com>
2005-04-08
news:d37pf8$17b3$2@digitaldaemon.com
author | thomask |
---|---|
date | Sat, 09 Apr 2005 06:14:14 +0000 |
parents | |
children | 30f510ddc33a |
rev | line source |
---|---|
413 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ Kirs <fu@bar.com> | |
6 // @date@ 2005-04-08 | |
7 // @uri@ news:d37pf8$17b3$2@digitaldaemon.com | |
8 | |
9 module dstress.run.overload_19; | |
10 | |
11 class Foo{ | |
12 int init (int x) { | |
13 return 0; | |
14 } | |
15 | |
16 static void init (long y) { | |
17 return 1; | |
18 } | |
19 } | |
20 | |
21 int main(){ | |
22 assert(Foo.init(2L)==1); | |
23 Foo f = new Foo; | |
24 assert(Foo.init(3L)==1); | |
25 assert(f.init(4L)==1); | |
26 assert(f.init(5)==0); | |
27 return 0; | |
28 } | |
29 | |
30 | |
31 |