Bug 13148 – ModuleInfo fields are unnecessary changed to const

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-07-17T04:48:00Z
Last change time
2014-08-22T07:17:24Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2014-07-17T04:48:51Z
Test case: void main() { ModuleInfo mi; foreach (m; ModuleInfo) { mi = *m; } } With 2.065: -> OK With 2.066 git-head: -> Error: cannot modify struct mi ModuleInfo with immutable members
Comment #1 by k.hara.pg — 2014-07-17T04:53:32Z
Comment #2 by github-bugzilla — 2014-07-17T23:20:40Z
Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/090cf82feac2cc3c888e3e217f67c704f6418a93 fix Issue 13148 - ModuleInfo fields are unnecessary changed to const https://github.com/D-Programming-Language/druntime/commit/c796f0d40222bce99ec9f3bbf894e660f5e25165 Merge pull request #898 from 9rnsr/fix13148 [REG2.066a] Issue 13148 - ModuleInfo fields are unnecessary changed to const
Comment #3 by github-bugzilla — 2014-07-21T00:42:55Z
Commit pushed to 2.066 at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/afd14d90d6cea01419faa9686fa42ccb3782fa7e Merge pull request #898 from 9rnsr/fix13148 [REG2.066a] Issue 13148 - ModuleInfo fields are unnecessary changed to const
Comment #4 by code — 2014-07-21T20:51:08Z
It should not be possible to copy ModuleInfo because it's a variable-length struct, so copying would slice off the data.
Comment #5 by github-bugzilla — 2014-08-22T07:17:24Z