Bug 10513 – pure overriding method cannot call impure out contract of base class

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-30T11:30:14Z
Last change time
2020-03-21T03:56:39Z
Keywords
pull, rejects-valid
Assigned to
No Owner
Creator
Henning Pohl

Comments

Comment #0 by henning — 2013-06-30T11:30:14Z
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' ---
Comment #1 by henning — 2013-06-30T11:36:27Z
Comment #2 by b2.temp — 2016-07-06T01:51:31Z