Created attachment 1519
A source file demonstrating the issue
Hi there!
Not sure if it's a bug. Nevertheless i found that one can easily call deprecated function with non-direct way. For example one can assume the address of such function to a pointer. So the compiler produces no warnings when calling deprecated function via the pointer. It also works with threads. I mean you can merely use a pointer to deprecated function as a thread-callee with the 'spawn' function from the std.concurrency module.
Regards!
Comment #1 by ag0aep6g — 2015-05-08T19:07:26Z
In combination with -de this is an accepts-invalid bug.
Comment #2 by k.hara.pg — 2015-06-01T23:36:12Z
> Created attachment 1519 [details]
> A source file demonstrating the issue
A small demonstration code can be inlined in the comment.
import std.stdio;
import std.concurrency;
void main()
{
auto f = &foo; // No warnings
f(); // No warnings
spawn(&foo); // No warnings
foo(); // Warning
}
deprecated void foo()
{
writeln("Yep. I'm a deprecated function!");
}
And, it's surely a dup of issue 7322.
*** This issue has been marked as a duplicate of issue 7322 ***