Added type resolution for generated variables.