For example,
T get()
should be overridable with
inout(T) get() inout
as the latter expands to
T get()
const(T) get() const
immutable(T) get() immutable
Other examples:
T get(T) can be overridden by inout(T) get(T) inout
or inout(T) get(inout T)
const(T) get(T) const by inout(T) get(T) inout
but not inout(T) get(inout T) inout
So, an inout method should be able to override a non-inout method if and only if all occurrences of inout in the overrider correspond to occurrences of the same mutability modifier in the overrided method.
Comment #1 by robert.schadek — 2024-12-13T18:49:36Z