D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20465 - Dynamic + static array declaration fail
Summary: Dynamic + static array declaration fail
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords: pull, wrong-code
Depends on:
Blocks:
 
Reported: 2019-12-25 06:58 UTC by feklushkin.denis
Modified: 2020-03-21 03:56 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description feklushkin.denis 2019-12-25 06:58:08 UTC
void main()
{
    int[][2][3] arr; // causes "Range violation" at runtime
}


Affected: DMD 2.090.0 (beta)
Comment 1 moonlightsentinel 2019-12-25 21:58:54 UTC
Digger blames https://issues.dlang.org/show_bug.cgi?id=20465
Comment 2 moonlightsentinel 2019-12-26 02:20:50 UTC
Correct link: https://github.com/dlang/dmd/pull/10600
Comment 3 Dlang Bot 2019-12-26 02:33:02 UTC
@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 Dlang Bot 2019-12-28 13:25:09 UTC
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