www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14284] New: spurious deprecation message when passing this


          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 puremagic.com
          Reporter: code dawg.eu

cat > bug.d << CODE
void foo(T)(auto ref T t)

class Bug
    void bar()

dmd -c bug.d

bug.d(9): Deprecation: this is not an lvalue

dmd --version

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.

Mar 14 2015