How is this code invalid?

thebluepandabear therealbluepandabear at protonmail.com
Sat Dec 17 02:36:10 UTC 2022


>
> T

Thanks, I've tried to mark it with `@safe` and it did give me a 
warning.

I was also wondering, why is this code valid?

```D
int[] numbersForLaterUse;

@safe void foo(int[] numbers) {
	numbersForLaterUse = numbers;
}
```



More information about the Digitalmars-d-learn mailing list