Thread overview
[Issue 4923] immutable module variables are modifiable in non-shared module constructors
Jul 05, 2017
Jonathan M Davis
May 09, 2019
Dlang Bot
May 10, 2019
Dlang Bot
Aug 12, 2019
Les De Ridder
July 05, 2017
https://issues.dlang.org/show_bug.cgi?id=4923

--- Comment #6 from Jonathan M Davis <issues.dlang@jmdavisProg.com> ---
An updated example, since Thread.sleep now requires that its argument be a core.time.Duration:

import core.thread, std.random, std.stdio;

immutable int x;

static this() {
  x = unpredictableSeed;
}

void main() {
  for(;;) {
    (new Thread({ })).start;
    Thread.sleep(seconds(1));
    writeln(x);
  }
}

--
July 06, 2017
https://issues.dlang.org/show_bug.cgi?id=4923

--- Comment #7 from Steven Schveighoffer <schveiguy@yahoo.com> ---
*** Issue 6114 has been marked as a duplicate of this issue. ***

--
July 06, 2017
https://issues.dlang.org/show_bug.cgi?id=4923

Steven Schveighoffer <schveiguy@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|pull                        |
                 CC|                            |schveiguy@yahoo.com

--
May 09, 2019
https://issues.dlang.org/show_bug.cgi?id=4923

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #8 from Dlang Bot <dlang-bot@dlang.rocks> ---
@Geod24 created dlang/dmd pull request #9754 "Fix issue 4923: Deprecate modifying immutable variable from `static this`" fixing this issue:

- Fix issue 4923: Deprecate modifying immutable variable from `static this`

https://github.com/dlang/dmd/pull/9754

--
May 10, 2019
https://issues.dlang.org/show_bug.cgi?id=4923

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #9754 "Fix issue 4923: Deprecate modifying immutable variable from `static this`" was merged into master:

- 7c4ccb75c9aee7dfaac66c65fe0fb11d29bca8b9 by Geod24:
  Fix issue 4923: Deprecate modifying immutable variable from `static this`

https://github.com/dlang/dmd/pull/9754

--
August 12, 2019
https://issues.dlang.org/show_bug.cgi?id=4923

Les De Ridder <dlang@lesderid.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dlang@lesderid.net

--