[Issue 19411] Visual D Intellisense chokes on static ifs
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Dec 7 08:03:01 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19411
--- Comment #4 from Rainer Schuetze <r.sagitario at gmx.de> ---
Thanks. It's a builtin limitation of the recursive descend parser because the
if/else-series creates a deep tree of AST nodes. Even if optimized in the
parser the same problem will appear during analysis.
I will increase the stack size to 8 MB, similar to dmd. dmd also chokes at some
point, e.g.
module mod;
string genIfElse(int n)
{
string s = "if(size_t.sizeof == 4) {}\n";
foreach(i; 0..n)
s ~= "else if(size_t.sizeof == 4) {}";
return s;
}
void test()
{
mixin(genIfElse(5000));
}
--
More information about the Digitalmars-d-bugs
mailing list