https://issues.dlang.org/show_bug.cgi?id=21832
Issue ID: 21832
Summary: Wrong deprecation message when importing
non-deprecated template in static condition
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
Similar to issue 21830, but uses selective imports.
---
module mod;
static if(1)
{
int fun()(int a)
{
return a;
}
}
deprecated double fun()(double a)
{
return a;
}
---
module main;
int inst(T)(T x)
{
import selective : fun; // template 'fun' is deprecated
return fun(x);
}
int main()
{
return inst(0); // instantiated from here
}
---
--