1136
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Anders Runesson <anders@runesson.info>
|
|
6 // @date@ 2006-07-16
|
|
7 // @uri@ news:1153058426.5844.3.camel@localhost
|
|
8 // @desc@ typedef, implicit cast, bug or feature?
|
|
9
|
|
10 module dstress.run.t.typedef_19_A;
|
|
11
|
|
12 class A{
|
|
13 int func(int i){
|
|
14 return i + 1;
|
|
15 }
|
|
16 }
|
|
17
|
|
18 typedef A B;
|
|
19
|
|
20 class C : B{
|
|
21 override int func(int i){
|
|
22 return super.func(i) * 2;
|
|
23 }
|
|
24 }
|
|
25
|
|
26 int main(){
|
|
27 C c = new C();
|
|
28
|
|
29 if(c.func(2) != 6){
|
|
30 assert(0);
|
|
31 }
|
|
32
|
|
33 return 0;
|
|
34 }
|