www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14213] New: Strange deprecated message in std.typecons.Proxy

https://issues.dlang.org/show_bug.cgi?id=14213

          Issue ID: 14213
           Summary: Strange deprecated message in std.typecons.Proxy with
                    using method
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: regression
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: zan77137 nifty.com

This code doesn't work(git HEAD):

-----------------------
import std.typecons, std.stdio;

struct A
{
    int foo(){return 1;}

    mixin Proxy!foo; // std\typecons.d(4408): Deprecation: casting from int
delegate() to const(void*) is deprecated
}

struct B
{
    int foo(){return 1;}

    alias foo this; // OK
}


void main()
{
    A a;
    B b;
    writeln(a + 1);
    writeln(b + 2);
}

--
Feb 21 2015