[Issue 10610] New: interpret.c:4067 Assertion Failure

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 11 05:16:58 PDT 2013


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

           Summary: interpret.c:4067 Assertion Failure
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: r.97all at gmail.com


--- Comment #0 from Ryuichi OHORI <r.97all at gmail.com> 2013-07-11 05:16:57 PDT ---
The code cause compiler crash.

-----
/d731/f346.d(21): Error: constructor f346.Polynomial!(int).Polynomial.this
(int[] coefs) is not callable using argument types ()
/d731/f346.d(21): Error: cannot implicitly convert expression
(Polynomial(null)) of type f346.Polynomial!(int).Polynomial to
immutable(Polynomial)
/d731/f346.d(6): Error: template instance f346.Polynomial!(int) error
instantiating
dmd: interpret.c:4067: virtual Expression* CallExp::interpret(InterState*,
CtfeGoal): Assertion `thisval && thisval->op == ((TOK)(TOKMAX+1))' failed.

-----
import std.numeric : gcd;
import std.algorithm : max;

void main()
{
    auto f = new Polynomial!int([1, 2, 3, 2, 1, 0, 0, 1, 1, 1]);
    f.gcd(f);
}

class Polynomial(T) // T係数の多項式
{
    this (T[] coefs)
    {
        this._coefs = coefs;
    }
    int opCmp(int rhs) immutable
    {
        return 1;
    }
    static immutable(Polynomial!T) min = new Polynomial!T();
private:
    T[] _coefs;
}

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