# HG changeset patch # User Moritz Warning # Date 1294325575 -3600 # Node ID e160bfec54d5813d10b9672af45c6cd336cc944c # Parent 4e908dadd51cddb539707f950ee979931490de1c add test diff -r 4e908dadd51c -r e160bfec54d5 run/class_cast.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/class_cast.d Thu Jan 06 15:52:55 2011 +0100 @@ -0,0 +1,24 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ SiegeLoard +// @date@ 2010-06-01 +// @uri@ http://dsource.org/projects/ldc/ticket/450 + +interface A +{ + +} + +class B : A +{ + byte[2] a; + real b; +} + +void main() +{ + A a = new B(); + B b = cast(B) a; +}