Bug 11055 – Regression (2.064 git-head): 'pure' function prevents its in-contract from checking parameters

Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-09-17T00:45:00Z
Last change time
2013-09-17T04:52:06Z
Keywords
rejects-valid
Assigned to
nobody
Creator
kekeniro2

Comments

Comment #0 by kekeniro2 — 2013-09-17T00:45:00Z
This code doesn't work in git-head. It is a regression introduced in 2.064 alpha. CODE: class SomeClass { pure void foo(int n) in { assert( !n ); } body { } } OUTPUT: Error: pure nested function '__require' cannot access mutable data 'n'
Comment #1 by henning — 2013-09-17T04:52:06Z
*** This issue has been marked as a duplicate of issue 10981 ***