why static array can be reassigned with new allocation?

Tejas notrealemail at gmail.com
Sat Oct 15 12:10:53 UTC 2022


On Saturday, 15 October 2022 at 11:29:00 UTC, rassoc wrote:
> On 10/14/22 21:46, jfondren via Digitalmars-d wrote:
>> and it crashes with an oversized array as the lengths don't 
>> match
>
> Try compiling with -release for extra fun, or not.

It printed the arrays
  ```
[0, 0, 0]
[0, 0, 0]
```
... lol did it cache the results of the previous call? Somebody 
please explain this, is this what Timon meant by undefined 
behaviour getting introduced in programs whose `assert`s get 
removed from the code?


More information about the Digitalmars-d mailing list