Create alias of same name in inner scope, bug or feature?

Tejas notrealemail at gmail.com
Sat Aug 14 03:47:05 UTC 2021


```d
import std;
auto abc(T)(auto ref T a, auto ref T b){
     return a+b;
}

auto def(T)(auto ref T a, auto ref T b){
         return a*b;

}
alias macro_1 = abc;
void main()
{
     writeln(macro_1(15, 20));
     alias macro_1 = def;// is this NOT considered variable 
shadowing?
     writeln(macro_1(100, 20));

}
```


More information about the Digitalmars-d-learn mailing list