www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1206] New: Compiler hangs on this() after method in class that forward references struct

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

           Summary: Compiler hangs on this() after method in class that
                    forward references struct
           Product: D
           Version: 1.014
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: wbaxter gmail.com


Here's the minimal repro:

--
class TiXmlParsingData
{
    void Stamp(){}

    this() { }

    TiXmlCursor         cursor;
}

struct TiXmlCursor
{
}
---

Change just about anything there and it will compile. Key points seem to be:  
1) struct must be forward referenced
2) constructor must be present
3) another method must be present
4) constructor must come *after* other method inside class.

This was extracted from the tinyxpath project on DSource.

Tested also against dmd 1.013, and dmd 1.010 with same results.


-- 
Apr 30 2007
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1206


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
            Summary|Compiler hangs on this()    |Compiler hangs on this()
                   |after method in class that  |after method in class that
                   |forward references struct   |forward references struct





Fixed DMD 1.018 and DMD 2.002


-- 
Jul 01 2007