Bug 13701 – [REG2.061] Associative array values ignore immutability

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-11-08T13:20:00Z
Last change time
2015-02-18T03:39:54Z
Keywords
accepts-invalid, pull
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2014-11-08T13:20:22Z
DMD 2.067alpha compiles and runs this without errors: void main() { immutable(int)[int] aa; aa[10] = 20; aa[10]++; }
Comment #1 by k.hara.pg — 2014-11-16T11:24:49Z
This is a regression from 2.061. With 2.060, the testcase prints: test.d(3): Error: aa[10] isn't mutable test.d(4): Error: aa[10] isn't mutable Compiler fix: https://github.com/D-Programming-Language/dmd/pull/4148
Comment #2 by github-bugzilla — 2014-11-21T15:49:26Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/821205fcf8ea2dcbfe10cd8db8d4c7f24d53271c Preparation for the issue 13701 - Hijack object.dup(aa) call to emulate it in CTFE https://github.com/D-Programming-Language/dmd/commit/45084f350eb3732ae64307fb037ab0735494d20f Merge pull request #4154 from 9rnsr/ctfe_aa_dup Preparation for the issue 13701 - Hijack object.dup(aa) call to emulate it in CTFE
Comment #3 by github-bugzilla — 2014-11-21T16:49:27Z
Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/5a5d1c5c4d9f27785422191178fc4e2876a0a097 Preparation for the issue 13701 - fix AA.dup for const elements https://github.com/D-Programming-Language/druntime/commit/4ae1da492bbdc6fa67dbe1e1274384b2cbb9b2e9 Merge pull request #1031 from 9rnsr/const_aa_dup Preparation for the issue 13701 - fix AA.dup for const elements
Comment #4 by github-bugzilla — 2014-11-21T17:24:15Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/2869ee9c1fb64f08b51d8d07ce72701dda4a6fae fix Issue 13701 - Associative array values ignore immutability https://github.com/D-Programming-Language/dmd/commit/c26153514f8538875ba945867e8afea6aca88bd5 Merge pull request #4148 from 9rnsr/fix13701 [REG2.061] Issue 13701 - Associative array values ignore immutability
Comment #5 by github-bugzilla — 2015-02-18T03:38:22Z
Comment #6 by github-bugzilla — 2015-02-18T03:39:54Z