It doesn't really look like a bug beside the fact that the compiler doesn't care about the methods being redefined... The first one to appear wins, easy!
```
struct S0
{
bool empty() { return false; }
int empty() { return false; }
}
pragma(msg, typeof(S0.empty)); // still bool()
```
Comment #2 by razvan.nitu1305 — 2022-07-27T10:06:15Z
Yes, this is not a bug. The alias introduces empty in the overload set and when used with pragma it simply selects the first overload it finds. For example:
```
struct S0
{
bool empty() { return false; }
}
struct S1
{
void empty(int a) {}
bool empty() { return false; }
//import std.range : empty;
}
pragma(msg, typeof(S0.empty)); // bool()
pragma(msg, typeof(S1.empty)); // void
```
This code has the same behavior. No shadowing is taking place.
Closing as invalid.