Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions changelog/disable-TypeInfo.init.dd

This file was deleted.

6 changes: 6 additions & 0 deletions changelog/remove-TypeInfo.init.dd
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
`TypeInfo.init` now refers to type property.

`TypeInfo.init` used to refer to the method that is now called
$(REF_OBJECT_SHORT TypeInfo.initializer). The name change was necessary because
the name "init" would clash with the type property of the same name
($(GLINK2 property, init)). `TypeInfo.init` now refers to the type property.
11 changes: 6 additions & 5 deletions src/object.d
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,6 @@ class TypeInfo
*/
abstract const(void)[] initializer() nothrow pure const @safe @nogc;

/// $(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,
2 means arg of this type is passed in XMM register */
@property uint flags() nothrow pure const @safe @nogc { return 0; }
Expand Down Expand Up @@ -360,6 +355,12 @@ class TypeInfo_Typedef : TypeInfo
void[] m_init;
}

unittest // issue 12233
{
static assert(is(typeof(TypeInfo.init) == TypeInfo));
assert(TypeInfo.init is null);
}

class TypeInfo_Enum : TypeInfo_Typedef
{

Expand Down