Pure Factory Functions 💔 `inout`

Kagamin spam at here.lot
Fri Feb 10 15:23:04 UTC 2023


On Friday, 10 February 2023 at 14:00:20 UTC, Steven Schveighoffer 
wrote:
> It can be weakly pure. The docs are wrong.

Looks like the check is deeper.
This doesn't work:

```d
struct A
{
	const int[] a;
}
pure A a(const int[] b)
{
	return A(b);
}
void e()
{
	int[] b;
	immutable A c=a(b);
}
```


More information about the Digitalmars-d mailing list