Bug 14284 – spurious deprecation message when passing this class pointer to auto-ref function
Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-03-14T18:28:00Z
Last change time
2015-03-15T13:19:50Z
Assigned to
nobody
Creator
code
Comments
Comment #0 by code — 2015-03-14T18:28:33Z
cat > bug.d << CODE
void foo(T)(auto ref T t)
{
}
class Bug
{
void bar()
{
foo(this);
}
}
CODE
dmd -c bug.d
----
bug.d(9): Deprecation: this is not an lvalue
----
dmd --version
v2.067.0-b4
This was introduced in https://github.com/D-Programming-Language/dmd/pull/4463 as a deprecation to make class this pointer rvalues.
We should find a way to avoid the deprecation message for auto ref parameters.
Comment #1 by code — 2015-03-15T13:19:50Z
*** This issue has been marked as a duplicate of issue 14283 ***