Your code shouldn't compile on devel (nimv2). The problems are many. For one the i member might now contain garbage, if it was a variable with an internal pointer like a seq/string/etc that could cause segmentation fault. Also is if you switch branches without freeing memory you get a memory leak.
- Change ref object variant in-place - drawbacks? drkameleon
- Change ref object variant in-place - drawbacks? planetis
