Thread overview
[Issue 24602] Internal compiler error: failed to detect static initialization of associative array
Jun 17
Dlang Bot
Jun 17
Dlang Bot
Jul 01
Dlang Bot
June 12
https://issues.dlang.org/show_bug.cgi?id=24602

sahan.h.fernando@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Internal compiler error     |Internal compiler error:
                   |static initialization of    |failed to detect static
                   |set                         |initialization of
                   |                            |associative array

--
June 12
https://issues.dlang.org/show_bug.cgi?id=24602

--- Comment #1 from sahan.h.fernando@gmail.com ---
Looking into this a bit more (running against all versions), it appears that it used to fail to compile with a proper error message, but now fails with an internal compiler error message. I assume this would be considered a regression then, since the ICE message only occurs from 2.106.1 onwards.

```
Up to      2.074.1: Failure with output: onlineapp.d(8): Error: non-constant
expression ["a":true, "b":true]
2.075.1 to 2.100.2: Failure with output: onlineapp.d(8): Error: non-constant
expression `["a":true, "b":true]`
2.101.2 to 2.105.3: Failure with output:
-----
onlineapp.d(8): Error: static initializations of associative arrays is not
allowed.
onlineapp.d(8):        associative arrays must be initialized at runtime:
https://dlang.org/spec/hash-map.html#runtime_initialization
-----

Since      2.106.1: Status -4 with output: onlineapp.d(8): Error: internal compiler error: failed to detect static initialization of associative array ```

--
June 12
https://issues.dlang.org/show_bug.cgi?id=24602

sahan.h.fernando@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |regression

--
June 17
https://issues.dlang.org/show_bug.cgi?id=24602

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

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

--- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> ---
@dkorpel created dlang/dmd pull request #16592 "Fix Bugzilla 24602 - Internal compiler error: failed to detect static…" fixing this issue:

- Fix Bugzilla 24602 - Internal compiler error: failed to detect static initialization of associative array

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

--
June 17
https://issues.dlang.org/show_bug.cgi?id=24602

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

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

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #16592 "Fix Bugzilla 24602 - Internal compiler error: failed to detect static…" was merged into stable:

- 17200412f5d1ebcf73fca199d86aaba1ced1bdfe by Dennis Korpel:
  Fix Bugzilla 24602 - Internal compiler error: failed to detect static
initialization of associative array

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

--
July 01
https://issues.dlang.org/show_bug.cgi?id=24602

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #16642 "merge stable" was merged into master:

- 3e92cca51d068a4fa4a78fd677d1e9279a5adccf by Dennis Korpel:
  Fix Bugzilla 24602 - Internal compiler error: failed to detect static
initialization of associative array

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

--