[Issue 14284] New: spurious deprecation message when passing this class pointer to auto-ref function
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Mar 14 11:28:33 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14284
Issue ID: 14284
Summary: spurious deprecation message when passing this class
pointer to auto-ref function
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: code at dawg.eu
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.
--
More information about the Digitalmars-d-bugs
mailing list