Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit d792992

Browse files
committed
Fix issue 16394 -- document the intiializer function behavior correctly.
1 parent ac56312 commit d792992

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/object.d

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,12 @@ class TypeInfo
286286
null if none. */
287287
@property inout(TypeInfo) next() nothrow pure inout @nogc { return null; }
288288

289-
/** Return default initializer. If the type should be initialized to all
290-
zeros, an array with a null ptr and a length equal to the type size will be
291-
returned. */
289+
/**
290+
* Return default initializer. If the type should be initialized to all
291+
* zeros, an array with a null ptr and a length equal to the type size will
292+
* be returned. For static arrays, this returns the default initializer for
293+
* a single element of the array, use `tsize` to get the correct size.
294+
*/
292295
abstract const(void)[] initializer() nothrow pure const @safe @nogc;
293296

294297
/// $(RED Scheduled for deprecation.) Please use `initializer` instead.

0 commit comments

Comments
 (0)