www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11225] New: Module dependency cycle causes import statements inside typeof() expressions inside templates fail

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: sludwig outerproduct.org



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: -------
Oct 11 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11225




PDT ---
Similar issues:
http://d.puremagic.com/issues/show_bug.cgi?id=10177
http://d.puremagic.com/issues/show_bug.cgi?id=10342

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 11 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11225




PDT ---
Oh and of course a "c" module is also needed:

c.d
---
// empty
---

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 11 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11225


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull



https://github.com/D-Programming-Language/dmd/pull/2671

The regression was introduced by fixing bug 9210 - a regression in 2.061-beta.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 15 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11225




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/a4ceb3355283dcef1bd8390b41d54a8d7e945ad9
fix Issue 11225 - Module dependency cycle causes import statements inside
typeof() expressions inside templates to fail

https://github.com/D-Programming-Language/dmd/commit/416fe49e58957cc9310e0d8f0009b76e3156fbf7


[REG2.061] Issue 11225 - Module dependency cycle causes import statements
inside typeof() expressions inside templates to fail

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 16 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11225




Commit pushed to 2.064 at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/699f0f8aaea6da475a1cb2956bb1d9087b48bf39


[REG2.061] Issue 11225 - Module dependency cycle causes import statements
inside typeof() expressions inside templates to fail

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 16 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11225


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 16 2013