[Issue 7091] New: ICE in Statement::blockExit

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Dec 10 11:51:15 PST 2011


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

           Summary: ICE in Statement::blockExit
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice-on-invalid-code, ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: mrmocool at gmx.de


--- Comment #0 from Trass3r <mrmocool at gmx.de> 2011-12-10 11:51:14 PST ---
struct Matrix(T)
{

    int opApply(scope int delegate(ref size_t, ref T) ) { }
    int opApply(scope int delegate(ref const(size_t), ref const(T)) )  { }

    Matrix!() opBinary()    {
        foreach (i, ref val; this)
mixin("result[i] = val " ~ op ~ " other[i];");         return result;
    }
}

void main() { auto m = Matrix!size_t; }

$ dmd -c test2.d 
test2.d(7): Error: template instance Matrix!() Matrix!() does not match
template declaration Matrix(T)
test2.d(7): Error: Matrix!() is used as a type
test2.d(4): Error: function test2.Matrix!(ulong).Matrix.opApply has no return
statement, but is expected to return a value of type int
test2.d(5): Error: function test2.Matrix!(ulong).Matrix.opApply has no return
statement, but is expected to return a value of type int
test2.d(8): Error: cannot uniquely infer foreach argument types
test2.d(9): Error: undefined identifier result
Statement::blockExit(0xcd15e0)
mixin("result[i] = val " ~ op ~ " other[i];");

dmd: statement.c:144: virtual int Statement::blockExit(bool): Assertion `0'
failed.

-- 
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