d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / casttuple.d
blob89e5f3de7eec9b995f09074465833904cdf30426
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/casttuple.d(104): Error: cannot cast `__tup1_field_0` of type `int` to type sequence `(string)`
5 fail_compilation/casttuple.d(107): Error: cannot cast `AliasSeq!(__tup2_field_0, __tup2_field_1)` of type `(int, int)` to type sequence `(string, string)`
6 fail_compilation/casttuple.d(111): Error: cannot cast `AliasSeq!(foo, 123)` of type `(int, int)` to type sequence `(string, string)`
7 ---
8 */
10 alias tuple(T...) = T;
12 #line 100
14 void nomatch()
16 tuple!int tup1;
17 auto x = cast(tuple!string) tup1;
19 tuple!(int, int) tup2;
20 auto y = cast(tuple!(string, string)) tup2;
22 int foo;
23 alias tup3 = tuple!(foo, 123);
24 auto z = cast(tuple!(string, string)) tup3;