In SuperComponent utils update _is_compatible(type1, type2)
to return the common type
#9076
Labels
P2
Medium priority, add to the next sprint if no P1 available
In SuperComponents during the validation of an
input_mapping
provided by a user we check if the types of the combined inputs are compatible using the_is_compatible
utility function._is_compatible
works by checking if the two types have some overlapping common type rather than using strict type validation.This is helpful because it can quickly alert a user if a mapping is not possible due to an incompatible type.
However, after this compatibility check we then assign one of the types (e.g.
type1
ortype2
) as the overall type of the input socket to the SuperComponent. This isn't 100% accurate because we should use the overlapping type of the two types.So my suggestion would be to expand on
_is_compatible
to also return the detected overlapping type between type1 and type2 which we could use to assign as the overall type for that input socket.The text was updated successfully, but these errors were encountered: