www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9439] New: CTFE ICE: calling member function after "incorrect this" error

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: clugdbug yahoo.com.au


--- Comment #0 from Don <clugdbug 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: -------
Feb 01 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9439


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-02-02 00:29:22 PST ---
D2 pull:
https://github.com/D-Programming-Language/dmd/pull/1597

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 02 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9439



--- Comment #2 from github-bugzilla puremagic.com 2013-02-02 13:31:28 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/b15f8396bd83757b5af0bcf68ea7639eb599c2ab
fix Issue 9439 - CTFE ICE: calling member function after "incorrect this" error

https://github.com/D-Programming-Language/dmd/commit/8ce5340d64533fb0bef7c5c152e2169bab36c3a6
Merge pull request #1597 from 9rnsr/fix9439

Issue 9439 - CTFE ICE: calling member function after "incorrect this" error

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