www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7158] New: [CTFE] dmd: interpret.c:4643: virtual Expression* CallExp::interpret(InterState*, CtfeGoal): Assertion `thisval && thisval->op == ((TOK)(TOKMAX+1))' failed.[CTFE]

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

           Summary: [CTFE] dmd: interpret.c:4643: virtual Expression*
                    CallExp::interpret(InterState*, CtfeGoal): Assertion
                    `thisval && thisval->op == ((TOK)(TOKMAX+1))'
                    failed.[CTFE]
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: mailme+d nilsb.dyndns.org



---
class C {
    bool b() {return true;}
}
struct S {
    C c;
}

bool test() {
    S s = S(new C);
    return s.c.b;
}
static assert(test());
---
Gives "dmd: interpret.c:4643: virtual Expression*
CallExp::interpret(InterState*, CtfeGoal): Assertion `thisval && thisval->op ==
((TOK)(TOKMAX+1))' failed."

These variations don't give errors:
---
bool test() {
    return S(new C).c.b;
}
bool test() {
    S s = S(new C);
    C c = s.c;
    return c.b;
}
---

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 23 2011
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7158


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED



15:10:16 PST ---
https://github.com/D-Programming-Language/dmd/commit/15039d5284922ac673023da65827460972ba60b3

https://github.com/D-Programming-Language/dmd/commit/3c95d9e1308ba60312947400c5ac02d4f7c4c410

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