Skip to content

Commit

Permalink
Fix bug in CreateListDirectStep which attempts to add unknowns to a…
Browse files Browse the repository at this point in the history
… list

PiperOrigin-RevId: 684461365
  • Loading branch information
jcking authored and copybara-github committed Oct 10, 2024
1 parent 11993ed commit c1dcb37
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions eval/eval/create_list_step.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,13 @@ class CreateListDirectStep : public DirectExpressionStep {
}
}

if (!unknowns.IsEmpty()) {
// We found an unknown, there is no point in attempting to create a
// list. Instead iterate through the remaining elements and look for
// more unknowns.
continue;
}

// Conditionally add if optional.
if (optional_indices_.contains(static_cast<int32_t>(i))) {
if (auto optional_arg =
Expand Down

0 comments on commit c1dcb37

Please # to comment.