[Issue 15789] New: ICE Assert in TemplateInstance semanticTiargs

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Mar 11 12:17:22 PST 2016


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

          Issue ID: 15789
           Summary: ICE Assert in TemplateInstance semanticTiargs
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: jbc.engelen at gmail.com

This issue was hard to reduce to a small testcase, and somehow only crashes
when two files are compiled at the same time, and the InputRange type is in its
own file.

inputrangetype.d:
```
struct InputRange
{
    ubyte[] front() {}
    void popFront() {}
    bool empty() {}
}
```

foo.d:
```
import std.digest.md;
import inputrangetype;

void foo()
{
    md5Of(InputRange());
}
```

bar.d:
```
import std.traits;
import std.digest.md;
import inputrangetype;

void bar()
{
    fullyQualifiedName!(md5Of!InputRange);
}
```

Compiled with this exact cmdline (reversing source files 'fixes' it):
  dmd foo.d bar.d
it crashes the compiler, with
core.exception.AssertError at dtemplate.d(7192): Assertion failure
https://github.com/D-Programming-Language/dmd/blob/204253b3111166cd30d5e42d936ed5f138920ff8/src/dtemplate.d#L7192
DMD64 D Compiler v2.070-devel-204253b
OS X El Capitan

--


More information about the Digitalmars-d-bugs mailing list