Bug 18765 – [Arrays] Docs need info on initialization of static array with element literal

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P4
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-04-15T21:47:12Z
Last change time
2023-01-30T03:13:29Z
Keywords
pull
Assigned to
No Owner
Creator
MrSmith33

Comments

Comment #0 by mrsmith33 — 2018-04-15T21:47:12Z
All elements of static array can be initialized to specific value with: ubyte[4] array = 42; assert(array == [42, 42, 42, 42]); Should be added to https://dlang.org/spec/arrays.html#static-init-static
Comment #1 by dlang-bot — 2023-01-30T01:43:56Z
@RazvanMihaiPopa updated dlang/dlang.org pull request #3504 "Fix Issue 18765: - [Arrays] Docs need info on initialization of static array with element literal" fixing this issue: - Fix Issue 18765: - [Arrays] Docs need info on initialization of static array with element literal https://github.com/dlang/dlang.org/pull/3504
Comment #2 by dlang-bot — 2023-01-30T03:13:29Z
dlang/dlang.org pull request #3504 "Fix Issue 18765: - [Arrays] Docs need info on initialization of static array with element literal" was merged into master: - d3a5b78f4bc55b32e6e024603c28a68a801980d1 by Razvan Mihai Popa: Fix Issue 18765: - [Arrays] Docs need info on initialization of static array with element literal https://github.com/dlang/dlang.org/pull/3504