which means that we catch more load-time errors for typos in
the configuration files.
and add test case.
The RHS resolution is done in pass2, so there's no issue with an
enum name being defined after the configuration files have been read.
*/
if (!input_rhs_rules) {
tmpl_rules_child_init(child_ctx, &my_rhs_rules, lhs_rules, map->lhs);
- rhs_rules = &my_rhs_rules;
+ } else {
+ my_rhs_rules = *input_rhs_rules;
}
+ rhs_rules = &my_rhs_rules;
+
+ da = tmpl_attr_tail_da(map->lhs);
+ if (edit && fr_type_is_leaf(da->type)) my_rhs_rules.enumv = tmpl_attr_tail_da(map->lhs);
break;
}
--- /dev/null
+#
+# The RHS isn't a number or an enum
+#
+&Tmp-Integer-0 := '$[3][2]' # ERROR
\ No newline at end of file