Thread overview
[Issue 2440] New: VarDeclaration::toSymbol(): Assertion `!needThis()' failed
Nov 03, 2008
d-bugmail
Nov 03, 2008
d-bugmail
Nov 24, 2008
d-bugmail
May 04, 2009
d-bugmail
November 03, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2440

           Summary: VarDeclaration::toSymbol(): Assertion `!needThis()'
                    failed
           Product: D
           Version: 2.020
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: jlquinn@optonline.net


-*- mode: compilation; default-directory: "~/d/" -*- Compilation started at Mon Nov  3 17:01:29

~/dmd/bin/dmd -c bug1.d
dmd: tocsym.c:166: virtual Symbol* VarDeclaration::toSymbol(): Assertion
`!needThis()' failed.

Compilation aborted at Mon Nov  3 17:01:29


-- 

November 03, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2440





------- Comment #1 from jlquinn@optonline.net  2008-11-03 16:02 -------
Created an attachment (id=278)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=278&action=view)
Source file causing failure


-- 

November 24, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2440


smjg@iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg@iname.com
           Keywords|                            |ice-on-valid-code
         OS/Version|Linux                       |All
            Version|2.020                       |2.019




------- Comment #2 from smjg@iname.com  2008-11-24 11:08 -------
A slightly reduced testcase:
----------
struct R {
    this(int i, int j) { from = i, to = j; }
    int from = -1;
    int to = -2;
}

class B {
    const void bar(in R r = R(0, -1)) {}
}

class M {
    B b;

    void foo() {
        b.bar();
    }
}

class M {
        B b;

        void foo() {
                b.bar();
        }
}
----------
Assertion failure: '!needThis()' on line 166 in file 'tocsym.c'

abnormal program termination
----------


-- 

May 04, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2440


clugdbug@yahoo.com.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE




------- Comment #3 from clugdbug@yahoo.com.au  2009-05-04 07:50 -------


*** This bug has been marked as a duplicate of 2437 ***


--