Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions helix-db/src/helixc/analyzer/methods/query_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ fn process_object_literal<'a>(
field_infos: vec![],
aggregate_properties: Vec::new(),
is_count_aggregate: false,
closure_param_name: None,
}
}

Expand Down Expand Up @@ -1007,6 +1008,7 @@ fn analyze_return_expr<'a>(
is_group_by,
aggregate_properties,
is_count_aggregate,
traversal.closure_param_name.clone(),
));
}

Expand Down Expand Up @@ -1075,6 +1077,7 @@ fn analyze_return_expr<'a>(
is_group_by,
aggregate_properties,
is_count_aggregate,
traversal.closure_param_name.clone(),
));

// Generate map closure (direct return, no variable assignment to update)
Expand Down Expand Up @@ -1160,6 +1163,7 @@ fn analyze_return_expr<'a>(
is_group_by,
aggregate_properties,
is_count_aggregate,
traversal.closure_param_name.clone(),
));
}

Expand Down
3 changes: 3 additions & 0 deletions helix-db/src/helixc/analyzer/methods/traversal_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1817,6 +1817,9 @@ pub(crate) fn validate_traversal<'a>(
)
.ok()?;

// Tag the main traversal with the closure parameter name
gen_traversal.closure_param_name = Some(cl.identifier.clone());

// Tag all nested traversals with closure context
for (_field_name, nested_info) in gen_traversal.nested_traversals.iter_mut() {
nested_info.closure_param_name = Some(cl.identifier.clone());
Expand Down
Loading
Loading