view compile/c/cast_33_B.d @ 1226:9ca9e2b68e77

[Issue 594] New: can't cast arrayliteral statically Nazo Humei <lovesyao@hotmail.com> 2006-11-25 news:bug-594-3@http.d.puremagic.com/issues/
author thomask
date Sat, 25 Nov 2006 13:36:56 +0000
parents
children daef239f37cf
line wrap: on
line source

// $HeadURL$
// $Date$
// $Author$

// @author@	Nazo Humei <lovesyao@hotmail.com>
// @date@	2006-11-25
// @uri@	news:bug-594-3@http.d.puremagic.com/issues/
// @desc@	[Issue 594] New: can't cast arrayliteral statically

module dstress.compile.c.cast_33_B;

const char[] a = ['a', 'b', 'c', 'd'];
const ubyte[] b = cast(ubyte[]) a;

static assert(b == ['a', 'b', 'c', 'd']);