www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23115] New: [REG 2.100]

https://issues.dlang.org/show_bug.cgi?id=23115

          Issue ID: 23115
           Summary: [REG 2.100] AssertError src/dmd/dtemplate.d(7397): can
                    only re-append from non-root to root module
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ibuclaw gdcproject.org

Triggers when using a debug build of the compiler:
---
/// imports/icecommon.d
module imports.icecommon
struct Single(T) { }

struct Pair(L, R)
{
    static if (is(R : Single!T, T))
        bool opEquals(L, R)(Pair!(L, R)) const;
}

static assert(is( Pair!(Single!int, Single!double) ));

---
/// imports/iceimport.d
module imports.iceimport;
import imports.icecommon;
struct Import
{
    Pair!(Single!int, Single!double) V;
}

struct Unused
{
    Pair!(int, Single!(Pair!(Single!int, Single!double))) X;
}

---
/// ice.d
module ice;
import imports.icecommon;

alias AliasSeq(T) = T;

struct Struct(T)
{
    AliasSeq!(T) field;
}

void fun()
{
    import imports.iceimport;
    Struct!Import var;
}

--
May 16 2022