[Issue 220] New: ICE with template and mangleof

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 23 05:17:16 PDT 2006


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

           Summary: ICE with template and mangleof
           Product: D
           Version: 0.160
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P4
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: clugdbug at yahoo.com.au


Assertion failure: 'deco' on line 536 in file 'mtype.c'
Tested with DMD-Windows 0.160 and 0.161.
Very easy workaround (just add parentheses).
---
template echidna(char[] str)
{
    const int echidna = 1;
}

// Must be 'typedef', can be any function or delegate
typedef int function (int) platypus;

// If you uncomment this next line, _both_ asserts will compile!
//static assert( echidna!((platypus).mangleof) == 1);

static assert( echidna!(platypus.mangleof) == 1);


-- 




More information about the Digitalmars-d-bugs mailing list