[Issue 21674] [REG v2.086] `alias this` triggers wrong deprecation message on function call
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 2 11:05:08 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21674
Mathias LANG <pro.mathias.lang at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|DUPLICATE |---
--- Comment #2 from Mathias LANG <pro.mathias.lang at gmail.com> ---
In the provided example, there is no assignment taking place, the compiler is
calling `str(string)`, so it is not "a feature".
I just read the initial issue again, and *if* we forbid `alias this` on the
LHS, the code I showed would still be valid. Looking at the deprecation, it is
expected to be turned into an error, which is why I marked it as
`rejects-valid`.
In Johan's last message, the code should really not need the `opAssign` in S1.
P.S: As a side note, issues that one would deem "a feature, not a bug" should
not be marked as duplicate of issue that change a behavior, but rather,
INVALID, as their premise is wrong.
--
More information about the Digitalmars-d-bugs
mailing list