www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21818] New: ICE: Assertion hit in dinterpret.d


          Issue ID: 21818
           Summary: ICE: Assertion hit in dinterpret.d
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: johanengelen weka.io

The testcase below compiles fine with normal compiler builds (assertions
disabled), but triggers the assertion in dinterpret.d on line 7362 (dlang
2.095) for debug compiler builds.

I've tried to minimize the testcase, but it requires Phobos's format, and
that's where I stopped:

import std.format;

void foo(bool, A.Info args) {

struct A {
    struct Info {
        A* self;

    auto getInfo() {
        return Info();

    void a() {
        foo(false, getInfo);


Apr 10 2021