[Issue 14283] New: [2.067-b4]: Spurious "this is not an lvalue" deprecation message for "auto ref" arguments
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Mar 14 02:06:59 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14283
Issue ID: 14283
Summary: [2.067-b4]: Spurious "this is not an lvalue"
deprecation message for "auto ref" arguments
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: sludwig at outerproduct.org
"auto ref" should deduce "this" argument to non-ref to avoid a deprecation
message showing up for valid code. The original place where this was triggered
was for std.typecons.scoped, where all arguments are declared as "auto ref".
---
class C {
void foo() {
bar(this);
}
}
void bar()(auto ref C) {}
---
(3): Deprecation: this is not an lvalue
--
More information about the Digitalmars-d-bugs
mailing list