[Issue 17233] New: getSymbolsByUDA toSymbols error instantiating if parent has same UDA field
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Feb 28 01:47:04 PST 2017
https://issues.dlang.org/show_bug.cgi?id=17233
Issue ID: 17233
Summary: getSymbolsByUDA toSymbols error instantiating if
parent has same UDA field
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: code.viator at gmail.com
```d
import std.traits;
enum myuda;
class A { @myuda int x; }
class B : A
{
@myuda int some;
void foo() { foreach (s; getSymbolsByUDA!(typeof(this), myuda)) {} }
}
void main() { (new B).foo(); }
```
% rdmd uda_symbols.d
/usr/include/dmd/phobos/std/traits.d-mixin-7250(7250): Error: template
instance/AliasSeq!(some, x) AliasSeq!(some, x) is nested in both B and A
/usr/include/dmd/phobos/std/traits.d(7259): Error: template instance
std.traits.getSymbolsByUDA!(B, myuda).toSymbols!("some", "x") error
instantiating uda_symbols.d(10): instantiated from here:
getSymbolsByUDA!(B, myuda)
--
More information about the Digitalmars-d-bugs
mailing list