On Friday, 8 August 2025 at 23:52:31 UTC, Brother Bill wrote:
D language supports shadowing members, where the shadowed member has same name and different type on same type.

Why is this enabled, and when should one use this advanced technique?

That's not considered as shadowing as you can distinguish the two members using a qualified access chain.

```d
class A {int m = 1;}
class B.A {float m;}

assert((new B).A.m == 1);
```

Reply via email to