Consider this simple example with foo.d and bar.d:
foo.d:
```
import core.stdc.stdio;
deprecated("To be removed November 2017. Please use std.utf.encode instead.")
void toUTF8(return out char[4] buf, dchar c)
{
pragma(msg, "bar CTFE");
printf("bar()");
}
void toUTF8(S)(S s)
{
pragma(msg, "foo CTFE");
printf("foo()");
}
```
bar.d:
```
void main(string[] args)
{
import foo : toUTF8;
toUTF8("aaa"d);
}
```
> rdmd bar.d foo.d
bar.d(4): Deprecation: function foo.toUTF8 is deprecated - To be removed November 2017. Please use std.utf.encode instead.
bar.d(4): Deprecation: function foo.toUTF8 is deprecated - To be removed November 2017. Please use std.utf.encode instead.
foo CTFE
bar CTFE
foo()
bar.d (working)
```
void main(string[] args)
{
import foo;
toUTF8("aaa"d);
}
```
Comment #1 by dlang-bugzilla — 2017-07-12T19:17:07Z
Same with a fully qualified import (`static import foo; foo.toUTF8("aoeu");` in your example).
Comment #2 by johanengelen — 2017-08-16T18:30:04Z
*** Issue 17757 has been marked as a duplicate of this issue. ***
Comment #3 by b2.temp — 2017-08-19T00:23:34Z
committer, fix also 16577, it's so closed.
Comment #4 by razvan.nitu1305 — 2021-08-13T07:22:32Z