Returning dynamic array from the function

bearophile bearophileHUGS at lycos.com
Wed Oct 17 12:46:50 PDT 2012


sclytrack:

> It doesn't give an error when marking the function with safe.
>
> @safe
> int[] create()
> {
> }

I think marking it @safe is not relevant. In theory a good type 
system should give an error message on similar code. I don't know 
if D is supposed to spot similar error situations.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list