Created attachment 1173
Reproduction case
Compiling the following three files using `dmd -c a.d` causes the compiler to
fail compiling code in std.complex:
a.d
---
import b;
interface A {}
---
b.d
---
import c;
import std.datetime;
interface B : A {}
---
c.d
---
import a;
interface C : A {}
---
output:
---
C:\D\dmd2\windows\bin\..\..\src\phobos\std\complex.d(678): Error: struct
std.complex.Complex does not match any template declaration
C:\D\dmd2\windows\bin\..\..\src\phobos\std\complex.d(678): Error:
Complex!(real) is used as a type
[...]
---
The error occurs for different configurations of imports and triggers errors in
completely different locations. Does not occur using DMD 2.060.
Comment #1 by sludwig — 2012-12-26T13:34:05Z
Just noticed that `b.d` is missing an `import a;`. This does not influence the error, though. Note that there is absolutely no connection to the user's code, so this is hard to track down.
If there isn't an obvious fix, I suggest reverting that fix, reopening its corresponding bug report, and add this example to the test suite.
Comment #4 by k.hara.pg — 2012-12-26T23:08:27Z
(In reply to comment #3)
> If there isn't an obvious fix, I suggest reverting that fix, reopening its
> corresponding bug report, and add this example to the test suite.
I made an obvious fix.
https://github.com/D-Programming-Language/dmd/pull/1412
This is a diagnostic bug. The fake errors were made by the incompletion of Phobos template instantiating.
Comment #5 by github-bugzilla — 2012-12-27T01:20:52Z