[Issue 18251] New: deprecate + transition=complex shouldn't look at functions with non-matching if constraints
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 17 08:08:36 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18251
Issue ID: 18251
Summary: deprecate + transition=complex shouldn't look at
functions with non-matching if constraints
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)
if (!__traits(isDeprecated, T))
{
return T.init;
}
deprecated
auto foo(T)(T t)
if (__traits(isDeprecated, T))
{
return T.init;
}
deprecated unittest
{
auto b = foo(2 + 2i);
}
---
This shouldn't trigger a deprecation on line 1:
> 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(8): Deprecation: use of complex type cdouble is deprecated, use
std.complex.Complex!(double) instead
--
More information about the Digitalmars-d-bugs
mailing list