www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 872] New: Assertion in expression.c caused by taking typeof of "this.outer" in nested classes.

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

           Summary: Assertion in expression.c caused by taking typeof of
                    "this.outer" in nested classes.
           Product: D
           Version: 1.00
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: tknott gmail.com





-- 
Jan 22 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=872


tknott gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code





Sorry, I accidentally hit "enter" before providing a description.  Anyways, the
following example (which seems to be valid D code) will cause an assertion in
the DMD frontend code (Assertion failure: 'global.errors || var' on line 1904
in file 'expression.c') upon compilation.  This bug affects both DMD and GDC.

Test case:
class ExOuter
{
        class ExInner
        {
                this() { typeof(this.outer) X; }
        }
}

void main() {}


-- 
Jan 22 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=872






Added to DStress as
http://dstress.kuehne.cn/compile/o/outer_02_A.d
http://dstress.kuehne.cn/compile/o/outer_02_B.d
http://dstress.kuehne.cn/compile/o/outer_02_C.d
http://dstress.kuehne.cn/compile/o/outer_02_D.d
http://dstress.kuehne.cn/compile/o/outer_02_E.d
http://dstress.kuehne.cn/compile/o/outer_02_F.d
http://dstress.kuehne.cn/compile/o/outer_02_G.d


-- 
Jan 23 2007