www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2440] New: VarDeclaration::toSymbol(): Assertion `!needThis()' failed

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


-- 
Nov 03 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2440






Created an attachment (id=278)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=278&action=view)
Source file causing failure


-- 
Nov 03 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
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





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


-- 
Nov 24 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2440


clugdbug yahoo.com.au changed:

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







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


-- 
May 04 2009