Parsing bug?
Jean-Louis Leroy
jl at leroy.nyc
Mon Apr 27 22:48:46 UTC 2020
import std.traits;
unittest
{
struct attr;
void foo() {}
ReturnType!foo bar(int a) {}
void baz(@attr int a) {}
ReturnType!foo blah(@attr int a) {}
}
dmd -c -unittest bug.d
bug.d(9): Error: found `blah` when expecting `;` following
statement
bug.d(10): Error: found `}` when expecting `;` following statement
bug.d(11): Error: found `End of File` when expecting `}`
following compound statement
This goes away if I remove `unittest { }`.
More information about the Digitalmars-d
mailing list