www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3247] New: Crash on overriding class methods with 'auto' return type

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

           Summary: Crash on overriding class methods with 'auto' return
                    type
           Product: D
           Version: 2.031
          Platform: Other
        OS/Version: All
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: jarrett.billingsley gmail.com


class A
{
    auto foo() { return 0; }
}

class B : A
{
    override auto foo() { return 5; } 
}


The compiler crashes.  It also crashes if A.foo's return type is int or B.foo's
return type is int (but not if both are int, obviously).  It doesn't crash if
foo is not overridden.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 12 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3247


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug yahoo.com.au







-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 12 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3247


Don <clugdbug yahoo.com.au> changed:

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







bug.d(4): Error: function ice.B.foo of type () overrides but is not covariant w
ith ice.A.foo of type ()

So marking as duplicate.

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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 12 2009