[Issue 24019] Public alias to private struct template in struct instantiated in UDA is not visible from module
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 28 07:57:12 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=24019
--- Comment #1 from FeepingCreature <default_357-line at yahoo.de> ---
Hm. I'm not actually convinced this is a _bug_.
We have a public alias, but the alias goes to a private template, and we
instantiate the template from outside via the alias.
The template has a private member... that member is found *via* the alias, but
is not itself anywhere marked as public. If we write it out:
```
struct S {
public alias A = T;
}
private template T() {
private struct T {}
}
...
@(S.A!().T)
void main() { }
```
It's not at all obvious that this is erroring wrongly.
--
More information about the Digitalmars-d-bugs
mailing list