On Sunday, 23 March 2025 at 05:40:32 UTC, Jonathan M Davis wrote:
On Saturday, March 22, 2025 11:38:05 AM MDT Paul Backus via
Digitalmars-d-learn wrote:
On Saturday, 22 March 2025 at 12:05:11 UTC, Ali Çehreli wrote:
> On 3/21/25 8:35 PM, Andy Valencia wrote:
>
> > tst39.d(21): add `alias this = tst39.A.this` to
> `tst39.B`'s body
> > to merge the overload sets
>
> Yeah, that doesn't work. Perhaps a regression...
It's never worked. The error message is wrong.
Well, that syntax should work with other member functions. So,
I would guess that the compiler is just giving the same error
message that it normally gives when this happens with member
functions, whereas since it doesn't work with constructors, it
really should have a different error message, but it doesn't.
Simple fix to not suggest alias when its a hidden constructor:
https://github.com/dlang/dmd/pull/21069