On Thu, Feb 03, 2022 at 02:01:34AM +0000, forkit via Digitalmars-d-learn wrote: [...] > would be nice if the compiler told me something though :-( > > i.e. "hey, dude, you really wanna to that?"
Mark your function @safe, and the compiler will stop you from unsafe casts of this nature. That's part of the reason we have @safe. ;-) T -- Everybody talks about it, but nobody does anything about it! -- Mark Twain