← Back to index
|
Original Bugzilla link
Bug 6773 – inout variable should not be modifiable
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-10-05T15:53:00Z
Last change time
2011-10-06T14:44:10Z
Keywords
accepts-invalid, patch
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0
by k.hara.pg — 2011-10-05T15:53:50Z
inout(int) foo(inout(int) x) { x = 5; // cannot modify inout return 0; } inout(T) variable is treated like const(T), then it is not modifiable.
Comment #1
by k.hara.pg — 2011-10-05T17:40:35Z
https://github.com/D-Programming-Language/dmd/pull/433
Comment #2
by bugzilla — 2011-10-06T14:44:10Z
https://github.com/D-Programming-Language/dmd/commit/39966f4f06a527ed67e6f1d6e948c9568a8745d0