I hit this issue in msgpack-d with 2.061.
Following Tuple definition causes compilation error:
Tuple!(ulong) a, b; // Tuple!(ulong) a; works
Error message:
Assertion failed: (0), function syntaxCopy, file declaration.c, line 183.
Comment #1 by bearophile_hugs — 2013-01-03T16:32:14Z
A little minimized:
template Foo(T...) {
alias T Foo;
}
struct Bar(U...) {
template spam(U...) {
alias Foo!(FieldSpec!(U[0])) spam;
}
alias spam!U baz;
}
int main() {
Bar!(ulong) a, b;
}
Further reduced test case:
template Foo(T...) {
T Foo;
}
struct Bar()
{
alias Foo!int f;
}
void main() {
Bar!() a, b;
}
Comment #4 by k.hara.pg — 2013-01-08T17:30:31Z
(In reply to comment #3)
> Further reduced test case:
>
> template Foo(T...) {
> T Foo;
> }
>
> struct Bar()
> {
> alias Foo!int f;
> }
>
> void main() {
> Bar!() a, b;
> }
Thanks for your work!
A pull request to fix the issue:
https://github.com/D-Programming-Language/dmd/pull/1447
Comment #5 by repeatedly — 2013-01-08T19:45:50Z
> bearophile, Artem
Thanks for minimizing the test case!
> kenji
LGTM!