What are some ways to get more strict type-checking?

sarn sarn at theartofmachinery.com
Mon May 6 02:37:29 UTC 2019


On Monday, 6 May 2019 at 02:02:52 UTC, Devin wrote:
> Recently, I poorly refactored some code, which introduced an 
> obvious bug.  But to my astonishment, the broken code compiled 
> without any warnings or notifications.  A minimum example is 
> shown below:
>
> alias ID = uint;
> ...

alias doesn't create a distinct type, but maybe Typedef from 
Phobos is what you want:

https://dlang.org/library/std/typecons/typedef.html


More information about the Digitalmars-d-learn mailing list