[Issue 2440] VarDeclaration::toSymbol(): Assertion `!needThis()' failed

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 24 09:08:45 PST 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2440


smjg at iname.com changed:

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




------- Comment #2 from smjg at 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
----------


-- 



More information about the Digitalmars-d-bugs mailing list