280
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Stewart Gordon <smjg_1998@yahoo.com>
|
|
6 // @date@ 2005-02-11
|
|
7 // @uri@ news:cui1u9$1kl1$1@digitaldaemon.com
|
1384
|
8 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2943
|
280
|
9
|
|
10 module dstress.run.overload_17;
|
|
11
|
|
12 class Parent {
|
|
13 Parent check(){
|
|
14 return new Parent;
|
|
15 }
|
|
16 }
|
|
17
|
|
18 class Sister : Parent {
|
|
19 Brother check(){
|
|
20 return new Brother;
|
|
21 }
|
|
22 }
|
|
23
|
|
24 class Brother : Parent {
|
|
25 }
|
|
26
|
|
27 int main(){
|
|
28 Parent p = (new Sister()).check();
|
|
29 return 0;
|
|
30 } |