Bug 19112 – Associative array opIn with static array key fails with dynamic array

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-07-23T07:35:42Z
Last change time
2023-06-16T06:37:01Z
Keywords
accepts-invalid, wrong-code
Assigned to
ag0aep6g
Creator
Peter Alexander

Comments

Comment #0 by peter.alexander.au — 2018-07-23T07:35:42Z
void main() { int[int[1]] aa; aa[[2]] = 1; assert([2] in aa); } --- This fails. Expected: either pass or fail to compile. Last reproduced in 2081.1.
Comment #1 by ag0aep6g — 2018-07-23T09:49:10Z
Comment #2 by github-bugzilla — 2018-08-07T21:36:08Z
Commit pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/c392e3cab3d6592f449270db539f67776e8ed315 fix issue 19112 - Associative array opIn with static array key fails with dynamic array
Comment #3 by github-bugzilla — 2018-08-12T15:35:11Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/e1701d74f5b51a1e7bdb26ee8e80887e4f537af7 fix issue 19112 - Associative array opIn with static array key fails with dynamic array https://github.com/dlang/dmd/commit/21fcc7c518b574f4f59bafe55b7348cd3b949313 Merge pull request #8516 from aG0aep6G/19112 fix issue 19112 - Associative array opIn with static array key fails …
Comment #4 by dlang-bugzilla — 2023-06-16T06:37:01Z
*** Issue 5685 has been marked as a duplicate of this issue. ***