Added test for type reassignment