It is a bug?
SealabJaster
sealabjaster at gmail.com
Tue Mar 30 14:55:21 UTC 2021
On Tuesday, 30 March 2021 at 11:17:55 UTC, Johan Engelen wrote:
> ...
Unfortunately not, it seems to happen when passing an alias
directly to any nested symbol.
e.g.
```
struct MyStruct { int a; }
void f(alias a)()
{
pragma(msg, __FUNCTION__);
}
alias fi = f!(MyStruct.a);
```
Prints `onlineapp.MyStruct.f!(a).f` where you can clearly see
that `f!(a)` is nested into `MyStruct`.
This also creates certain limitations such as:
```
struct A { int a; }
struct B { int b; }
void f(alias a, alias b)(){}
alias fi = f!(A.a, B.b);
// onlineapp.d(4): Error: template instance f!(a, b) f!(a, b) is
nested in both A and B
```
More information about the Digitalmars-d
mailing list