May 07, 2017 Deprecation: foo.bar is not visible from module traits | ||||
|---|---|---|---|---|
| ||||
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 08, 2017 Re: Deprecation: foo.bar is not visible from module traits | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Anonymouse | Known issue: https://issues.dlang.org/buglist.cgi?quicksearch=getSymbolsByUDA Ali | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply