www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8484] New: [CTFE] Assertion failure: 'thisval && thisval->op == TOKclassreference' on line 4896 in file 'interpret.c'.

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

           Summary: [CTFE] Assertion failure: 'thisval && thisval->op ==
                    TOKclassreference' on line 4896 in file 'interpret.c'.
           Product: D
           Version: unspecified
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: sweatygarlic yahoo.co.jp


--- Comment #0 from sweatygarlic yahoo.co.jp 2012-07-31 05:12:41 PDT ---
class C {
    bool b() {return true;}
}

struct S {
    C c;
}

bool t( ref C c ){
    return c.b;
}

bool test() {
    auto s = S(new C);
    return t(s.c);
}
static assert(test());
---
causes "Assertion failure: 'thisval && thisval->op == TOKclassreference' on
line 4896 in file 'interpret.c'" on dmd 2.059

this is similar to the issue 7158
http://d.puremagic.com/issues/show_bug.cgi?id=7158

and the issue 4257
http://d.puremagic.com/issues/show_bug.cgi?id=4257

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 31 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8484


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |clugdbug yahoo.com.au


--- Comment #1 from Don <clugdbug yahoo.com.au> 2012-09-11 06:14:39 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1093

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 11 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8484



--- Comment #2 from github-bugzilla puremagic.com 2012-09-11 15:24:03 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/fde72f585147009078d14eeb82b18cd91b00490e
Fix issue 8484 [CTFE] ICE(interpret.c) calling member of class passed by
reference

We need to resolve references before determining which function to call.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 11 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8484


Walter Bright <bugzilla digitalmars.com> changed:

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


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 11 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8484


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
            Version|unspecified                 |D1
         Resolution|FIXED                       |


--- Comment #3 from Kenji Hara <k.hara.pg gmail.com> 2012-09-21 09:00:57 PDT ---
D2 branch is already fixed, but D1 has same issue.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 21 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8484


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED


--- Comment #4 from Kenji Hara <k.hara.pg gmail.com> 2012-09-23 18:52:43 PDT ---
Fixed in D1 branch:
https://github.com/D-Programming-Language/dmd/commit/8ca66b12438f52141eab7d70c14a92675b1c30c3

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 23 2012