annotate run/class_cast.d @ 1626:e160bfec54d5

add test
author Moritz Warning <moritzwarning@web.de>
date Thu, 06 Jan 2011 15:52:55 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1626
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
1 // $HeadURL$
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
2 // $Date$
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
3 // $Author$
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
4
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
5 // @author@ SiegeLoard
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
6 // @date@ 2010-06-01
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
7 // @uri@ http://dsource.org/projects/ldc/ticket/450
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
8
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
9 interface A
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
10 {
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
11
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
12 }
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
13
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
14 class B : A
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
15 {
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
16 byte[2] a;
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
17 real b;
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
18 }
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
19
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
20 void main()
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
21 {
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
22 A a = new B();
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
23 B b = cast(B) a;
e160bfec54d5 add test
Moritz Warning <moritzwarning@web.de>
parents:
diff changeset
24 }