Bug 20465 – Dynamic + static array declaration fail

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-12-25T06:58:08Z
Last change time
2020-03-21T03:56:42Z
Keywords
pull, wrong-code
Assigned to
No Owner
Creator
feklushkin.denis

Comments

Comment #0 by feklushkin.denis — 2019-12-25T06:58:08Z
void main() { int[][2][3] arr; // causes "Range violation" at runtime } Affected: DMD 2.090.0 (beta)
Comment #1 by moonlightsentinel — 2019-12-25T21:58:54Z
Comment #2 by moonlightsentinel — 2019-12-26T02:20:50Z
Comment #3 by dlang-bot — 2019-12-26T02:33:02Z
@MoonlightSentinel created dlang/dmd pull request #10698 "Fix Issue 20465 - Dynamic + static array declaration fail" fixing this issue: - Fix Issue 20465 - Dynamic + static array declaration fail Implements a cleaner solution for issue 10562 which tries to match the assigned expression against all dimensions of the target (instead of bluntly rewriting to keep type safety). Rewrites the original test to orderly check all possible combinations. https://github.com/dlang/dmd/pull/10698
Comment #4 by dlang-bot — 2019-12-28T13:25:09Z
dlang/dmd pull request #10698 "Fix Issue 20465 - Dynamic + static array declaration fail" was merged into stable: - 6ce09f814cc4669da3185a35e540164384be54fa by MoonlightSentinel: Fix Issue 20465 - Dynamic + static array declaration fail Implements a cleaner solution for issue 10562 which tries to match the assigned expression against all dimensions of the target (instead of bluntly rewriting to keep type safety). Rewrites the original test to orderly check all possible combinations. https://github.com/dlang/dmd/pull/10698