www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8768] New: DMD segfaults if templated ctor is inherited

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

           Summary: DMD segfaults if templated ctor is inherited
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: admin dav1d.de



class Bar {    
    this(T)(string s, T x) {}
}


class Main : Bar {
    this(string s) {}

    //this()(string s) {} // this version compiles    
}


Note: this also happens with GDC and LDC

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 06 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8768


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice
                 CC|                            |yebblies gmail.com
            Summary|DMD segfaults if templated  |ICE(access.c) Implicit
                   |ctor is inherited           |super call to templated
                   |                            |constructor
           Severity|normal                      |critical



It looks like the call to super can't be resolved, resulting in 'd' being null
inside accessCheck.

class A {    
    this(T)() {}
}

class B : A {
    this() {}
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 06 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8768


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE



The root cause is same as 9273.
(Bug 9273 is a regression, so mark as a duplication.)

*** This issue has been marked as a duplicate of issue 9273 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 08 2013