www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4129] New: ICE(glue.c, !vthis->csym): indexing delegate literal in tuple

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4129

           Summary: ICE(glue.c, !vthis->csym): indexing delegate literal
                    in tuple
           Product: D
           Version: 1.020
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: clugdbug yahoo.com.au


--- Comment #0 from Don <clugdbug yahoo.com.au> 2010-04-26 02:56:03 PDT ---
Applies at least as far back as DMD1.020; also applies to D2. Discovered while
reducing bug 1350. Swapping the order of the two asserts allows it to compile.
==========

void mountainGoat(Callbacks ...)() {
    alias Callbacks[0] Cb;  
    assert(Callbacks[0].ptr);
    assert(Cb.ptr);
}

void gazelle() {
    mountainGoat!( (int i) { int x = i; }   )();
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 26 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4129


kennytm gmail.com changed:

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


--- Comment #1 from kennytm gmail.com 2011-05-31 08:57:53 PDT ---
Apparently fixed in 2.053. Not sure about 1.x.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 31 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4129



--- Comment #2 from Don <clugdbug yahoo.com.au> 2013-04-09 00:37:12 PDT ---
To make this compile on D2, needs to be changed so that it's a delegate literal
again, instead of a function literal. Passes on D2, still ICE on D1.
Revised test case:
---
void mountainGoat(Callbacks ...)() {
    alias Callbacks[0] Cb;
    assert(Callbacks[0].ptr);
    assert(Cb.ptr);
}

void gazelle() {
    int m = 0;
    mountainGoat!( (int i) { int x = m + i; }   )();
}

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