www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1153] New: dmd assertion failure

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

           Summary: dmd assertion failure
           Product: D
           Version: 1.012
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: davidl 126.com


interface Foo
{
        void work();
}
template Wrapper(B, alias Func, int func)
{
        alias typeof(&Func) FuncPtr;

        private static FuncPtr get_funcptr() { return func; }
} 


int main(char[][] args)
{
        auto x = new Wrapper!(Foo, Foo.work,
cast(int)(Foo.classinfo.vtbl[0]))();

        return 0;
}

Assertion failure: 'e1->type' on line 6377 in file 'expression.c'

abnormal program termination


-- 
Apr 16 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1153


thomas-dloop kuehne.cn changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Windows                     |All





The code you posted is invalid. Replace "template Wrapper" with "class Wrapper" 
or "struct Wrapper".

Added to DStress as
http://dstress.kuehne.cn/compile/c/classinfo_02_A.d
http://dstress.kuehne.cn/compile/c/classinfo_02_B.d


-- 
Apr 23 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1153


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed DMD 1.014


-- 
Apr 27 2007