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

@disable TypeInfo.init #1766

Merged
merged 2 commits into from
Mar 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions changelog/disable-TypeInfo.init.dd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
`TypeInfo.init` has been `@disable`d.

$(REF_OBJECT_SHORT TypeInfo.init) has been `@disable`d. Use
$(REF_OBJECT_SHORT TypeInfo.initializer) instead.

`TypeInfo.init` is a legacy alias of the method that is now called
$(REF_OBJECT_SHORT TypeInfo.initializer). The name change is necessary because
the name "init" clashes with the type property of the same name
($(GLINK2 property, init)).

The legacy alias has been deprecated since 2.072.0. It's going to be removed in
2.075.0.
8 changes: 3 additions & 5 deletions src/object.d
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,9 @@ class TypeInfo
*/
abstract const(void)[] initializer() nothrow pure const @safe @nogc;

/// $(RED Scheduled for deprecation.) Please use `initializer` instead.
deprecated("Please use initializer instead.") alias init = initializer;
// since 2.072
version(none) @disable static const(void)[] init(); // planned for 2.073
/* Planned for 2.074: Remove init, making way for the init type property,
/// $(RED Removed.) Please use `initializer` instead.
@disable static const(void)[] init(); // since 2.074
/* Planned for 2.075: Remove init, making way for the init type property,
fixing issue 12233. */

/** Get flags for type: 1 means GC should scan for pointers,
Expand Down