by tomjakubowski · 2y ago · 0 comments
They are in the process of rewording such cases as erroneous instead of UB, but it will take time.
If it's simply erroneous, then it behaves like in every other language outside C and C++: it leaves memory in a bad state if it happens at runtime, but it doesn't have any effect at compile time.
You also have languages using immutable or persistent data structures in their std lib to side-step the problem.