I don't know why you would even want to do that except to confuse future maintainers by reusing a variable when you clearly need it for a different purpose and even if your code was perfectly acceptable it would require full type inference, otherwise it wouldn't be possible to find the common super type for all assignments.
I can claim that this code sucks because the original instance should not be created unless it is needed but instead I am just going to point out the fact that you cannot use var everywhere. The old syntax will still work and you should fallback to it on occasion.
0
u/immibis Mar 10 '16