On Monday, 25 May 2020 at 01:35:47 UTC, Danni Coy wrote:
s = 8; // this works S s = 8 // but this does not? }
alias this only applies if you already have an object. Construction is too soon.
You can add a constructor to make that work though.
Adam D. Ruppe via Digitalmars-d-learn Mon, 25 May 2020 05:36:30 -0700
On Monday, 25 May 2020 at 01:35:47 UTC, Danni Coy wrote:
s = 8; // this works S s = 8 // but this does not? }
alias this only applies if you already have an object. Construction is too soon.
You can add a constructor to make that work though.