Bug 24603 – Can copy from non-void array into void[] in safe code

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2024-06-14T15:05:23Z
Last change time
2024-10-04T12:51:39Z
Keywords
pull, safe
Assigned to
No Owner
Creator
Nick Treleaven

Comments

Comment #0 by nick — 2024-06-14T15:05:23Z
void main() @safe { Object[] objs = [ new Object() ]; void[] arr1 = objs; void[] arr2 = [ 123, 345, 567 ]; arr1[] = arr2[]; // error arr1[] = [5]; // no error } PR incoming.
Comment #1 by dlang-bot — 2024-06-14T15:09:27Z
@ntrel created dlang/dmd pull request #16584 "Fix Bugzilla 24603 - Can copy from non-void array into void[] in safe…" fixing this issue: - Fix Bugzilla 24603 - Can copy from non-void array into void[] in safe code Deprecate in safe code. https://github.com/dlang/dmd/pull/16584
Comment #2 by dlang-bot — 2024-06-16T06:59:22Z
dlang/dmd pull request #16584 "Fix Bugzilla 24603 - Can copy from non-void array into void[] in safe…" was merged into master: - f42dc60597bc904bee9b2377877d511f9dae3cf5 by Nick Treleaven: Fix Bugzilla 24603 - Can copy from non-void array into void[] in safe code Deprecate in safe code. https://github.com/dlang/dmd/pull/16584
Comment #3 by dkorpel — 2024-10-04T12:51:39Z
*** Issue 20345 has been marked as a duplicate of this issue. ***