The following code gives a wrong deprecation message since DMD 2.088: ``` import std.typecons; alias T = Nullable!ulong; T normal; T[4] array; T[string] aa; void g(string s, ulong value) { normal = value; // no problem array[0] = value; // no problem aa[s] = value; // Should directly use opAssign. Instead gives wrong deprecation message: // std.typecons.Nullable!ulong.Nullable.get_ is deprecated - Implicit conversion with alias Nullable.get this will be removed after 2.096. Please use .get explicitly. aa[s].opAssign(value); // workaround that works without deprecation msg } void main() { g("hoi", 1); } ``` The deprecation message is invalid: alias this is never used (because Nullable.opAssign is directly callable). Moreover, the suggested fix (".get()") results in wrong code.
Instead of opAssign, the better fix is `aa[s] = Nullable!ulong(value);`.
I cannot reproduce this with latest master. Closing as WORKSFORME. @Johan please reopen if you have anything else to add.
This started working with 2.097. As per the wrong deprecation message, probably this was automatically "fixed" by removing Implicit conversion with alias this.