set var's type to expression's type