schema compile BUGFIX compile uses in input/output
In these cases the parent should be the operation,
not input/output.
diff --git a/src/schema_compile_amend.c b/src/schema_compile_amend.c
index 2b3865f..7c5fea3 100644
--- a/src/schema_compile_amend.c
+++ b/src/schema_compile_amend.c
@@ -1832,6 +1832,14 @@
/* compile the children */
if (target->nodetype == LYS_CHOICE) {
LY_CHECK_GOTO(ret = lys_compile_node_choice_child(ctx, pnode, target, &child_set), cleanup);
+ } else if (target->nodetype & (LYS_INPUT | LYS_OUTPUT)) {
+ if (target->nodetype == LYS_INPUT) {
+ ctx->options |= LYS_COMPILE_RPC_INPUT;
+ } else {
+ ctx->options |= LYS_COMPILE_RPC_OUTPUT;
+ }
+ ret = lys_compile_node(ctx, pnode, (struct lysc_node *)lysc_node_parent_full(target), 0, &child_set);
+ LY_CHECK_GOTO(ret, cleanup);
} else {
LY_CHECK_GOTO(ret = lys_compile_node(ctx, pnode, target, 0, &child_set), cleanup);
}