Bug 10981 – Contracts in pure class methods are useless

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-09-06T11:29:00Z
Last change time
2015-02-18T03:37:33Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
henning

Comments

Comment #0 by henning — 2013-09-06T11:29:40Z
This regression was my fault, sorry for that: https://github.com/D-Programming-Language/dmd/pull/2516 I can't believe it passed the test suite: class C { void foo(int i) pure in { assert(i); } body { } } --- main.d(4): Error: pure nested function '__require' cannot access mutable data 'i' ---
Comment #1 by henning — 2013-09-06T11:31:34Z
Comment #2 by henning — 2013-09-17T04:52:06Z
*** Issue 11055 has been marked as a duplicate of this issue. ***
Comment #3 by k.hara.pg — 2013-10-02T00:15:01Z
Comment #4 by github-bugzilla — 2013-10-07T18:33:28Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/15aa4468ea76b80d5c2cdb0298a824fa5d508494 fix Issue 10981 - Contracts in pure class methods are useless https://github.com/D-Programming-Language/dmd/commit/5305d38c1e6265b97b6b69d43376a1e39950cb38 Merge pull request #2615 from 9rnsr/fix10981 Issue 10981 - Contracts in pure class methods are useless
Comment #5 by github-bugzilla — 2014-11-13T10:59:24Z
Comment #6 by github-bugzilla — 2015-02-18T03:37:33Z