[Issue 18250] New: deprecate + transition=complex should check whether the templates are instantiated from a deprecated scope

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 17 08:01:56 UTC 2018


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

          Issue ID: 18250
           Summary: deprecate + transition=complex should check whether
                    the templates are instantiated from a deprecated scope
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: greensunny12 at gmail.com

auto foo(T)(T t)
{
    return T.init;
}

deprecated unittest
{
    auto b = foo(2 + 2i);
}

This shouldn't trigger an error, but it does:

> dmd -unittest -c -o- -transition=complex foo.d


foo.d(1): Deprecation: use of complex type cdouble is deprecated, use
std.complex.Complex!(double) instead
foo.d(3): Deprecation: use of complex type cdouble is deprecated, use
std.complex.Complex!(double) instead
foo.d(1): Deprecation: use of complex type cdouble is deprecated, use
std.complex.Complex!(double) instead

--


More information about the Digitalmars-d-bugs mailing list