treat changes the declared type of an expression.

You must have the EXECUTE object privilege on type to use this function.