comparison run/t/template_struct_09_C.d @ 1510:f0259cabdf78

[Issue 1140] ICE casting tuple member to tuple struct Don Clugston <clugdbug@yahoo.com.au> 2007-04-03 http://d.puremagic.com/issues/show_bug.cgi?id=1140
author thomask
date Mon, 23 Apr 2007 18:08:12 +0000
parents
children
comparison
equal deleted inserted replaced
1509:fba3b66d0276 1510:f0259cabdf78
1 // $HeadURL$
2 // $Date$
3 // $Author$
4
5 // @author@ Don Clugston <clugdbug@yahoo.com.au>
6 // @date@ 2007-04-03
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1140
8 // @desc@ [Issue 1140] ICE casting tuple member to tuple struct
9
10 module dstress.run.t.template_struct_09_C;
11
12 class Dog(B...){
13 B values;
14
15 static Dog!(B) create(B x) {
16 return *cast(Dog!(B)*)(&x[1]);
17 }
18 }
19
20 int main(){
21 auto c = Dog!(int, int).create(7, 5);
22 return 0;
23 }