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.
https://github.com/dlang/dmd/blob/f6188d5cd620aca785d211570bf2bf2fb21679ba/src/dmd/dinterpret.d#L7362
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) {
format!"%s"(args);
}
struct A {
struct Info {
A* self;
}
auto getInfo() {
return Info();
}
void a() {
foo(false, getInfo);
}
}
```
https://d.godbolt.org/z/jcGaj7PKq
Comment #1 by boris2.9 — 2021-10-15T12:49:41Z
*** This issue has been marked as a duplicate of issue 21794 ***