1135
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Carlos Santander <csantander619@gmail.com>
|
|
6 // @date@ 2006-07-09
|
|
7 // @uri@ news:e8sdrv$2k9c$1@digitaldaemon.com
|
1379
|
8 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=660
|
1135
|
9 // @desc@ name resolution and static function
|
|
10
|
|
11 module dstress.run.s.static_37_C;
|
|
12
|
|
13 class A{
|
|
14 int foo (){
|
|
15 return 1;
|
|
16 }
|
|
17
|
|
18 protected static int foo (int i){
|
|
19 return i + 1;
|
|
20 }
|
|
21 }
|
|
22
|
|
23 class B{
|
|
24 int foo (int x){
|
|
25 return A.foo(x) * 2;
|
|
26 }
|
|
27 }
|
|
28
|
|
29 int main(){
|
|
30 B b = new B();
|
|
31
|
|
32 if(b.foo(2) != 6){
|
|
33 assert(0);
|
|
34 }
|
|
35
|
|
36 return 0;
|
|
37 }
|