With user-defined types, different rules are applied for assignments to host variables than are used for all other assignments.
Assignment to host variables is done based on the source type of the distinct type. That is, it follows the rule:
If the target of the assignment is a column, the source data type must be castable to the target data type as described in Casting Between Data Types for user-defined types.