Bug 11563 – Module dependency cycle causes unrelated template instantiations to fail

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-11-20T02:45:00Z
Last change time
2013-11-24T17:19:09Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
sludwig
Depends on
11225

Comments

Comment #0 by sludwig — 2013-11-20T02:45:17Z
Compiling the following on DMD 2.061-2.064 using "dmd -c a.d" results in a number of template instantiation failures (std.algorithm.startsWith). DMD 2.060 still works. This is very similar to 11225 (or rather that was the primary cause for it), which probably was just a symptom of the same underlying cause. a.d: --- import b; interface I {} --- b.d --- import a; import std.traits; interface J : I {} // comment out to let compilation succeed struct A { } template B(T) { enum mod = moduleName!T; } pragma(msg, B!A.mod); --- Sorry for this only partially reduced test case, but this has been lying around for a while on my desk now and I never got the time to fully reduce it, so I thought I'd rather report what I have before it falls under the table. But also, it's likely that a fully reproduced case would again just lead to a partial fix.
Comment #1 by dlang-bugzilla — 2013-11-20T20:46:24Z
Possibly related to 7852/7904.
Comment #2 by k.hara.pg — 2013-11-23T23:51:38Z
Comment #3 by github-bugzilla — 2013-11-24T11:58:36Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/cc355e33e31852718753852390b2257d8871819b fix Issue 11563 - Module dependency cycle causes unrelated template instantiations to fail https://github.com/D-Programming-Language/dmd/commit/47332912de517274e139f34a7faac0f32efd5833 Merge pull request #2872 from 9rnsr/fix11563 [REG2.061] Issue 11563 - Module dependency cycle causes unrelated template instantiations to fail