Bug 10947 – const out parameter is not properly rejected

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-09-01T18:57:00Z
Last change time
2013-10-01T04:20:59Z
Keywords
accepts-invalid, pull
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2013-09-01T18:57:31Z
Reduced test case: struct S {} void foo(const out S) {} // correctly rejected: "Error: out cannot be const" alias SC = const S; void bar(out SC) {} // NG, no error occurs
Comment #1 by k.hara.pg — 2013-09-01T19:23:09Z
Comment #2 by github-bugzilla — 2013-10-01T04:20:44Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/55decc97e5d059684e20c6dcd6a66aaa8b497f6f fix Issue 10947 - const out parameter is not properly rejected Bitwise-and of Type::mod vs STCxxx is merely a mistake. Additionally, `out inout` parameter should also be rejected. https://github.com/D-Programming-Language/dmd/commit/e0a201bbf80fb7bfbc7e5caf2c29921c3bddf5e3 Merge pull request #2511 from 9rnsr/fix10947 Issue 10947 - const out parameter is not properly rejected