| 1 |
/* TEST_OUTPUT: |
| 2 |
--- |
| 3 |
fail_compilation/fail8262.d(32): Error: initializer must be an expression, not `Tuple8262!1` |
| 4 |
fail_compilation/fail8262.d(27): Error: template instance `fail8262.T8262!(Tuple8262!1)` error instantiating |
| 5 |
fail_compilation/fail8262.d(19): Error: cannot implicitly convert expression `S(0)` of type `S` to `int` |
| 6 |
--- |
| 7 |
* https://issues.dlang.org/show_bug.cgi?id=8262 |
| 8 |
*/ |
| 9 |
|
| 10 |
template Seq(T...) { alias T Seq; } |
| 11 |
|
| 12 |
struct S |
| 13 |
{ |
| 14 |
int s; |
| 15 |
alias Seq!s _; |
| 16 |
alias _ this; |
| 17 |
} |
| 18 |
|
| 19 |
int si = S.init; |
| 20 |
|
| 21 |
struct Tuple8262(T...) |
| 22 |
{ |
| 23 |
alias T expand; |
| 24 |
alias expand this; |
| 25 |
} |
| 26 |
|
| 27 |
auto data = T8262!(Tuple8262!1); |
| 28 |
//pragma(msg, data); |
| 29 |
|
| 30 |
template T8262(T) |
| 31 |
{ |
| 32 |
immutable(int) T8262 = T; |
| 33 |
} |