[Issue 11225] New: Module dependency cycle causes import statements inside typeof() expressions inside templates fail
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Oct 11 08:39:53 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11225
Summary: Module dependency cycle causes import statements
inside typeof() expressions inside templates fail
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: regression
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: sludwig at outerproduct.org
--- Comment #0 from Sönke Ludwig <sludwig at outerproduct.org> 2013-10-11 08:39:51 PDT ---
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";
}
---
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list