digitalmars.D.bugs - [Issue 2595] New: template ctors crash compiler
- d-bugmail puremagic.com (24/24) Jan 20 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2595
- d-bugmail puremagic.com (9/9) Apr 01 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2595
http://d.puremagic.com/issues/show_bug.cgi?id=2595
           Summary: template ctors crash compiler
           Product: D
           Version: 2.023
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: silvioricardoc gmail.com
Compiler segfaults when processing the following template if it was mixed in a
struct. It doesn't if the mixin happened inside a class.
It complains that Templ.this(int) is not a ctor (and that, hence, you can't
forward to this(double) from there) before crashing.
template Templ () {
    this(int i) { this(0.0); }
    this(double d) { }
}
class C { mixin Templ; } // OK
struct S { mixin Templ; } // Crashes in Templ
void main() { }
-- 
 Jan 20 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2595
bugzilla digitalmars.com changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
Fixed DMD 2.027
-- 
 Apr 01 2009








 
  
  
  d-bugmail puremagic.com
 d-bugmail puremagic.com