D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17233 - getSymbolsByUDA toSymbols error instantiating if parent has same UDA field
Summary: getSymbolsByUDA toSymbols error instantiating if parent has same UDA field
Status: RESOLVED DUPLICATE of issue 17870
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-28 09:47 UTC by Oleg B
Modified: 2020-08-27 22:20 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Oleg B 2017-02-28 09:47:04 UTC
```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)
Comment 1 Boris Carvajal 2020-08-27 22:20:22 UTC

*** This issue has been marked as a duplicate of issue 17870 ***