it will likely be useful later, but for now nothing in the
code supports it
return false;
}
}
+
+ /*
+ * If the LHS is structural, then that limits
+ * what the RHS can be.
+ */
+ if (tmpl_is_list(map->lhs) ||
+ (tmpl_is_attr(map->lhs) && fr_type_is_structural(tmpl_da(map->lhs)->type))) {
+ if (!tmpl_is_list(map->rhs) && !tmpl_is_attr(map->rhs)) {
+ cf_log_err(map->ci, "Cannot assign xlat / data / exec to list or structural type");
+ return false;
+ }
+ }
}
/*
bool is_string;
fr_value_box_t *box = fr_dlist_head(&out->result);
- fr_assert(fr_type_is_leaf(lhs->vp_type));
+ if (!fr_type_is_leaf(lhs->vp_type)) {
+ REDEBUG("RHS is not a leaf");
+ return -1;
+ }
/*
* There's only one box, and it's the correct type. Just