diff --git a/changelog/disable-TypeInfo.init.dd b/changelog/disable-TypeInfo.init.dd new file mode 100644 index 0000000000..824635eae3 --- /dev/null +++ b/changelog/disable-TypeInfo.init.dd @@ -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. diff --git a/src/object.d b/src/object.d index fb1709450b..0838124d88 100644 --- a/src/object.d +++ b/src/object.d @@ -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,