mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
28 lines
356 B
D
28 lines
356 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/ice12838.d(27): Error: cannot implicitly convert expression `1` of type `int` to `string`
|
|
---
|
|
*/
|
|
|
|
struct Tuple(T...)
|
|
{
|
|
T field;
|
|
alias field this;
|
|
}
|
|
|
|
struct Data
|
|
{
|
|
string a;
|
|
}
|
|
|
|
template toTuple(T)
|
|
{
|
|
mixin(`alias toTuple = Tuple!(string);`);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
toTuple!Data a;
|
|
a[0] = 1; // ICE!
|
|
}
|