www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10513] New: pure overriding method cannot call impure out contract of base class

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

           Summary: pure overriding method cannot call impure out contract
                    of base class
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: henning still-hidden.de


--- Comment #0 from Henning Pohl <henning still-hidden.de> 2013-06-30 11:30:14
PDT ---
class C {
    void foo() pure
    out { }
    body { }
}

class D : C {
    override void foo() pure
    { }
}

---
main.d(8): Error: pure function 'main.D.foo' cannot call impure function
'main.C.foo.__ensure'
---

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 30 2013
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10513


Henning Pohl <henning still-hidden.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid


--- Comment #1 from Henning Pohl <henning still-hidden.de> 2013-06-30 11:36:27
PDT ---
https://github.com/D-Programming-Language/dmd/pull/2282

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