[Issue 6198] New: [GSoC] ICE(e2ir.c) With circular import

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 23 08:25:30 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6198

           Summary: [GSoC] ICE(e2ir.c) With circular import
           Product: D
           Version: D1 & D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: robert at octarineparrot.com


--- Comment #0 from Robert Clipsham <robert at octarineparrot.com> 2011-06-23 16:20:40 BST ---
Reduced test case from the GSoC mailing list:
arraystorage.d:
----
import vector;
struct ArrayViewStorage( T ) {
    ArrayStorage!T array_;
}
struct ArrayStorage( T ) {
        alias ArrayViewStorage!T View;
        this( BaseVector!View vec ) {
        }
}
----
vector.d:
----
import arraystorage;

struct BaseVector( Storage ) {
        Storage storage() { return stor; }
        Storage stor;
}

template Vector( T ) {
    alias BaseVector!( ArrayStorage!T ) Vector; 
}

void main() {
        auto a = Vector!int();
}
----
Compile with: dmd arraystorage.d vector.d

Note that reversing the order of files fixes the issue.

-- 
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