Thread overview
[Issue 3920] New: Assertion failure: '0' on line 10018 in file 'expression.c'
Mar 10, 2010
Aldo Nunez
Mar 11, 2010
Don
Mar 13, 2010
Walter Bright
Apr 09, 2010
Don
March 10, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3920

           Summary: Assertion failure: '0' on line 10018 in file
                    'expression.c'
           Product: D
           Version: 2.041
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: crimson.magus@gmail.com


--- Comment #0 from Aldo Nunez <crimson.magus@gmail.com> 2010-03-09 18:03:42 PST ---
The error is in MulExp::semantic. It happens no matter if the multiplication expression is in a template. These are the combinations that fail:

IF / ifloat
IF / IF
ID / idouble
ID / ID
IR / ireal
IR / IR


Here's a sample:

import std.stdio;

typedef ifloat IF;
typedef idouble ID;
typedef ireal IR;

template PrintAddedType(X, Y)
{
    void PrintAddedType()
    {
        X x;
        Y y;
        writeln( typeid( x ), " ", typeid( y ), " ", typeid( x / y ) );
    }
}

template PrintAddedType(X)
{
    void PrintAddedType()
    {
/*
        PrintAddedType!(X, ifloat)();
        PrintAddedType!(X, idouble)();
        PrintAddedType!(X, ireal)();
*/
/*
        PrintAddedType!(X, IF)();
        PrintAddedType!(X, ID)();
        PrintAddedType!(X, IR)();
*/
    }
}

void main()
{
/*
    PrintAddedType!(IF)();
    PrintAddedType!(ID)();
    PrintAddedType!(IR)();
*/
    IR x;
    IR y;
    writeln( typeid( x ), " ", typeid( y ), " ", typeid( x / y ) );
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 11, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3920


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |clugdbug@yahoo.com.au


--- Comment #1 from Don <clugdbug@yahoo.com.au> 2010-03-10 23:56:41 PST ---
The patch for bug 3919 fixes this one, too.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 13, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3920


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com


--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2010-03-12 20:53:31 PST ---
changeset 415

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


Don <clugdbug@yahoo.com.au> changed:

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


--- Comment #3 from Don <clugdbug@yahoo.com.au> 2010-04-09 13:39:13 PDT ---
Fixed DMD1.058 and 2.043.

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