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

           Summary: [GSoC] ICE - Assertion failure: 'next' on line 254 in
                    file 'toctype.c'
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: cristi.cobzare...@gmail.com


--- Comment #0 from Cristi Cobzarenco <cristi.cobzare...@gmail.com> 2011-07-02 
06:11:52 PDT ---
== File 1: imported.d ==
struct MixinAlias( T ) {
    private T m_;
    auto front() { return 1; }
}

mixin template Mixin( T ) {    
    alias MixinAlias!(typeof(this)) LocalAlias;
}

struct Mixer( T ) {
    mixin Mixin!( T );
}

== File 2: main.d ==
import imported;

int main() {
    alias Mixer!int Failure;
    return 0;
}

Compiled with: dmd imported.d main.d
Output: Assertion failure: 'next' on line 254 in file 'toctype.c'
Platform: Windows 7 x86_64
DMD: 2.053

The following things fix the error:
- Changing the order of the files.
- Moving everything in one module.
- Changing auto to int in the declaration of MixinAlias.front
- Moving the alias from Mixin to Mixer.
- Removing the member m_ from MixinAlias.

This bug might not seem major, but it's very hard to avoid in the design I've
chosen for my GSoC project.

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

Reply via email to