316
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Nick Sabalausky <z@a.a>
|
|
6 // @date@ 2005-02-01
|
1489
|
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2825
|
1383
|
8 // @uri@ nntp://news.digitmars.com/digitalmars.D.bugs
|
316
|
9
|
|
10 // name resolution happens before overload resolution
|
|
11
|
374
|
12 // __DSTRESS_ELINE__ 27
|
|
13
|
421
|
14 module dstress.nocompile.overload_16;
|
316
|
15
|
|
16 int status;
|
|
17
|
|
18 void check(int x){
|
|
19 status++;
|
|
20 }
|
|
21
|
|
22 class MyClass{
|
|
23 void test(){
|
|
24 assert(status==0);
|
|
25 .check(0);
|
|
26 assert(status==1);
|
|
27 .check();
|
|
28 assert(status==3);
|
|
29 }
|
|
30
|
|
31 void check(){
|
|
32 assert(status==1);
|
|
33 status+=2;
|
|
34 }
|
|
35 }
|
|
36
|
|
37 int main(){
|
|
38 MyClass c = new MyClass();
|
|
39 assert(status==0);
|
|
40 c.test();
|
|
41 assert(status==3);
|
|
42 check(0);
|
|
43 assert(status==4);
|
|
44 return 0;
|
|
45 }
|