digitalmars.D.learn - Deprecation: foo.bar is not visible from module traits
- Anonymouse (28/28) May 07 2017 I'm reworking my code to use UDAs, and I'm running into a wall of
- =?UTF-8?Q?Ali_=c3=87ehreli?= (3/3) May 08 2017 Known issue:
I'm reworking my code to use UDAs, and I'm running into a wall of
text of deprecation warnings when compiling.
import std.traits;
private:
struct SomeUDA {}
SomeUDA
void foo() {}
SomeUDA
void bar() {}
SomeUDA
void etc() {}
public:
void main()
{
mixin("static import thisModule = " ~ __MODULE__ ~ ";");
foreach (symbol; getSymbolsByUDA!(thisModule, SomeUDA))
{
static if (isSomeFunction!symbol)
{
pragma(msg, symbol.stringof);
}
}
}
See https://wandbox.org/permlink/6Z01koyGGRxjsNWG for the output
it gives. In the real code it's unmanageably many lines.
Is there any way to get rid of these warnings except by making
everything public? Ideally I wouldn't want to copy the source of
getSymbolsByUDA into each file doing this either.
May 07 2017
Known issue: https://issues.dlang.org/buglist.cgi?quicksearch=getSymbolsByUDA Ali
May 08 2017








=?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com>