Mercurial > projects > dstress
annotate nocompile/cast_10.d @ 1576:b3e16c86558e
[Issue 1398] New: GDC doesn't generate correct code
<mariusmuja@gmail.com>
2007-08-04
http://d.puremagic.com/issues/show_bug.cgi?id=1398
author | thomask |
---|---|
date | Thu, 21 Feb 2008 15:20:08 +0000 |
parents | 20d8ee6523e1 |
children |
rev | line source |
---|---|
389
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
1 // $HeadURL$ |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
2 // $Date$ |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
3 // $Author$ |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
4 |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
5 // @author@ Jarrett Billingsley <kb3ctd2@yahoo.com> |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
6 // @date@ 2005-01-09 |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
7 // @uri@ news:crshla$2io3$1@digitaldaemon.com |
1384 | 8 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2659 |
389
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
9 |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
10 // __DSTESS_ELINE__ 25 |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
11 |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
12 module dstress.nocompile.cast_10; |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
13 |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
14 class Parent{ |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
15 } |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
16 |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
17 class Child : Parent { |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
18 } |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
19 |
1535 | 20 void test(ref Parent p){ |
389
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
21 } |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
22 |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
23 int main(){ |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
24 Child c = new Child(); |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
25 test(c); |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
26 return 0; |
bd5c0f9ebec7
allowing thes passing of reference to a derived class as an inout function parameter would open up a huge hole in the typing system of the language
thomask
parents:
diff
changeset
|
27 } |