The variable's type does not allow it to be used as if it were of the specified type.
Change the program so that it does not use the variable as if it were a different type.