Issue 20691 - Converting scope static array to scope dynamic array should be error
Summary: Converting scope static array to scope dynamic array should be error
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: pull, safe
Depends on:
Blocks:
 
Reported: 2020-03-21 08:08 UTC by Walter Bright
Modified: 2021-08-27 14:02 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 Walter Bright 2020-03-21 08:08:49 UTC
void bar() @safe
{
    scope char[][2] sa;
    scope char[][] da = sa; // should give error
}
Comment 1 Walter Bright 2020-03-21 08:15:48 UTC
-preview=dip1000 too
Comment 2 Dlang Bot 2020-03-21 08:16:28 UTC
@WalterBright created dlang/dmd pull request #10951 "fix Issue 20691 - Converting scope static array to scope dynamic arra…" fixing this issue:

- fix Issue 20691 - Converting scope static array to scope dynamic array should be error

https://github.com/dlang/dmd/pull/10951
Comment 3 Mathias LANG 2020-03-21 08:55:10 UTC
Why ?
Comment 4 Mathias LANG 2020-03-21 08:57:57 UTC
I see you commented on 20505. Why open a new issue then ? Let's keep the discussion in one place.

*** This issue has been marked as a duplicate of issue 20505 ***
Comment 5 Dlang Bot 2021-08-27 14:02:50 UTC
dlang/dmd pull request #10951 "fix Issue 20691 - Converting scope static array to scope dynamic arra…" was merged into master:

- 4da2034d14e9a9aa19260fde343b5fc6b613201f by Walter Bright:
  fix Issue 20691 - Converting scope static array to scope dynamic array should be error

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