[Issue 1206] New: Compiler hangs on this() after method in class that	forward references struct
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Mon Apr 30 22:11:21 PDT 2007
    
    
  
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 at digitalmars.com
        ReportedBy: wbaxter at 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.
-- 
    
    
More information about the Digitalmars-d-bugs
mailing list