[Issue 6918] New: Internal error: e2ir.c 1242
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Nov  9 02:38:39 PST 2011
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=6918
           Summary: Internal error: e2ir.c 1242
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: tobias at pankrath.net
--- Comment #0 from Tobias Pankrath <tobias at pankrath.net> 2011-11-09 02:37:54 PST ---
I'd say, I found another compiler bug.
-----------------
import std.stdio;
template Struct(alias bar)
{
    struct S
    {
        void foo()
        {
            FancyFunc!(this, bar).fn();
        }
    }
}
template FancyFunc(alias context, alias f)
{
    void fn()
    {
        writeln("before");
        f(context);
        writeln("after");
    }
}
void bar(CT)(CT context)
{
    writeln(CT.stringof);
}
void main()
{
    alias Struct!(bar).S MyStruct;
    MyStruct s = MyStruct();
    s.foo();
}
----------------------
Compile it with dmd and dmd will print:
> Internal error: e2ir.c 1242
-- 
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