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



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



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




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                       |



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



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