Type* cond_specializeType(Term* caller) { Value choices; Type* leftType = caller->input(1) != NULL ? caller->input(1)->type : NULL; Type* rightType = caller->input(2) != NULL ? caller->input(2)->type : NULL; set_type_list(&choices, leftType, rightType); return find_common_type(&choices); }
Type* find_common_type(Type* type1, Type* type2, Type* type3) { List list; set_type_list(&list, type1, type2, type3); return find_common_type(&list); }
Type* specializeType(Term* caller) { List choices; set_type_list(&choices, caller->input(1)->type, caller->input(2)->type); return find_common_type(&choices); }