Mercurial > projects > dstress
annotate run/overload_20.d @ 416:b7efa2ad5425
fixed void/int typo
author | thomask |
---|---|
date | Sat, 09 Apr 2005 19:22:15 +0000 |
parents | ad4e3b6d6192 |
children | 9e0847cf535a |
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_20; | |
10 | |
11 struct Foo{ | |
12 int init (int x) { | |
13 return 0; | |
14 } | |
15 | |
416 | 16 static int init (long y) { |
413 | 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 |