Thread overview
[Issue 6240] New: [GSoC] ICE - Assertion failure: 'next' on line 254 in file 'toctype.c'
Jul 02, 2011
Cristi Cobzarenco
Jul 02, 2011
kennytm@gmail.com
[Issue 6240] ICE(toctype.c) [GSoC]: with template mixin
Apr 20, 2012
SomeDude
Oct 05, 2013
Walter Bright
July 02, 2011
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: nobody@puremagic.com
        ReportedBy: cristi.cobzarenco@gmail.com


--- Comment #0 from Cristi Cobzarenco <cristi.cobzarenco@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: -------
July 02, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6240


kennytm@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kennytm@gmail.com


--- Comment #1 from kennytm@gmail.com 2011-07-02 13:04:48 PDT ---
Apparently fixed somewhere between DMD commits 0d93cf4333df6e167f9027eb1a4b0aa9a940ff19 and dbdbeb1ed9890e317c0fbb594dd331f18d025864. Anyway, I can't reproduce this in OS X with git master.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 20, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6240


SomeDude <lovelydear@mailmetrash.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lovelydear@mailmetrash.com


--- Comment #2 from SomeDude <lovelydear@mailmetrash.com> 2012-04-20 15:03:51 PDT ---
Can't reproduce on 2.059 Win32 either.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 05, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=6240


Walter Bright <bugzilla@digitalmars.com> changed:

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


--- Comment #3 from Walter Bright <bugzilla@digitalmars.com> 2013-10-05 16:39:28 PDT ---
Works fine on 2.064 head.

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