[Issue 19950] access violation at compile time, possibly via static foreach and alias interaction

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 11 02:33:44 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=19950

--- Comment #1 from emmanuelle <lakeavenger+dlangi at gmail.com> ---
Actually, it seems you can create an even tinier example:

---
alias Foo = NotHere;
alias Bar = baz!();

void baz()(Foo)
    if (true)
{}
---

Which compiles fine (with a normal error) from dmd v2.060 until v2.066, but in
v2.067 and v2.068 it has this cryptic error:

---
onlineapp.d(1): Error: undefined identifier NotHere
dmd: template.c:930: MATCH TemplateDeclaration::matchWithInstance(Scope*,
TemplateInstance*, Objects*, Expressions*, int): Assertion `fd->type->ty ==
Tfunction' failed.
---

And from v2.069 onwards it has a segfault/access violation.

--


More information about the Digitalmars-d-bugs mailing list