rql #176472 add_type_restriction vs is_instance_of [validation pending]

it currently attempts to do weird things included some cases where RQLException will be raised. According to the docstring contract "builds a restriction node to express : variable is etype", we should imo simply remove the is_instance_of relation then add a new is relation.

We may want to add some type checking (eg restricted type is in the possible types for the variable) but this is not even properly done yet in the 'is' case, so this may be left for another ticket.

appeared in<not specified>
done in0.31.5
load left0.000
closed by#ef50aa5ed8ce add_type_restriction properly behave vs is_instance_of relation. Closes #176472
patchadd_type_restriction properly behave vs is_instance_of relation. Closes #176472 [applied]