Compiling the following with "dmd -c a.d" results in a failure of the last
static assertion. Removing the actual dependency of b on a by commenting out
the declaration of J lets the assertion pass.
This bug is the supposed cause for loads of bogus error messages referring to
"startsWith" or "Appender". I was sure that the issue was already reported, but
didn't find anything useful, except for some possibly related bugs that have no
reduced test case.
This is a regression introduced in DMD 2.061.
a.d
---
import b;
interface I {}
---
b.d
---
import a;
interface J : I {} // remove this line to make it work
static assert(is(typeof({ import c; }))); // OK
pragma(msg, B!().result); // just instantiates the template
template B() {
static assert(is(typeof({ import c; }))); // FAILS
enum result = "WORKS";
}
---