dlang-community / libdparse

Library for lexing and parsing D source code
https://libdparse.dlang.io
Boost Software License 1.0
114 stars 56 forks source link

spurious parse error with static foreach and mixin #430

Closed ghost closed 3 years ago

ghost commented 3 years ago
static foreach (char c; "ABCDEFGHIJKLMN")
{
    mixin ("alias ", c, "(T) = T;");
    mixin ("alias ", c, c, " = ", c, "!int;");
}

Declaration expected

Hackerpilot commented 3 years ago

I'm not able to reproduce the issue with the code snippet that you provided. I also tried a few things like enclosing it in a struct and a function body.

ghost commented 3 years ago

it's possible that actually it would be fixed as dparse used is at 24155ce1b3514fe2db74a00260cf4bb17e77cef3

Hackerpilot commented 3 years ago

What tool were you using when you found this?

ghost commented 3 years ago

I think this is indeed a problem whith the tool.