[Issue 15667] New: dmd infinite loop on invalid syntax.
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Feb 9 17:01:55 PST 2016
https://issues.dlang.org/show_bug.cgi?id=15667
Issue ID: 15667
Summary: dmd infinite loop on invalid syntax.
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: major
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: john.loughran.colvin at gmail.com
% cat traits.d
template staticIndexOf(T)
{
enum staticIndexOf = genericIndexOf!T;
}
template genericIndexOf(args...)
{
alias e = args;
alias tuple = args;
alias tail = tuple;
enum next = genericIndexOf!(e, tail);
}
alias X = ;
static if (staticIndexOf!X)
% cat generator.d
unittest
{
import traits;
}
% dmd -unittest generator.d
traits.d(16): Error: basic type expected, not ;
traits.d(20): Error: declaration expected following attribute, not EOF
and then it just hangs forever, endlessly allocating memory.
--
More information about the Digitalmars-d-bugs
mailing list