[Issue 9439] New: CTFE ICE: calling member function after "incorrect this" error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Feb 1 07:48:55 PST 2013


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

           Summary: CTFE ICE: calling member function after  "incorrect
                    this" error
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: clugdbug at yahoo.com.au


--- Comment #0 from Don <clugdbug at yahoo.com.au> 2013-02-01 07:48:53 PST ---
class Base {
  void boo(alias F)() {
      static assert(F());
  }
}

class Derived : Base {
  int foo() { return 1; }
  void bug() {
   boo!(foo)();
  }
}

-----
xx.d(3): Error: this for foo needs to be type Derived not type xx.Base
dmd: interpret.c:4000: virtual Expression* CallExp::interpret(InterState*,
CtfeGoal): Assertion `thisval && thisval->op == ((TOK)(TOKMAX+1))' failed.

CTFE should not be attempted after the error occurs.

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