Skip to content

Commit

Permalink
Document issue calling map() on fun with assert!()/fail!().
Browse files Browse the repository at this point in the history
While investigating what is going on, augmented CHECK with
some more useful output and pointing to a potential issue.
Might as well submit to repo for easier future
finding the existing bug until it is fixed.

Issues #1477

PiperOrigin-RevId: 643119651
  • Loading branch information
hzeller authored and Copybara-Service committed Jun 13, 2024
1 parent 0c7892c commit 586178f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xls/ir/verify_node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,9 @@ class NodeChecker : public DfsVisitor {

Type* operand_element_type =
map->operand(0)->GetType()->AsArrayOrDie()->element_type();
XLS_RET_CHECK_EQ(1, map->to_apply()->params().size());
XLS_RET_CHECK_EQ(1, map->to_apply()->params().size())
<< map->to_apply()->name() << "() should have exactly one argument. "
<< "https://github.com/google/xls/issues/1477 ?";
XLS_RETURN_IF_ERROR(ExpectSameType(
map->operand(0), operand_element_type, map->to_apply()->params()[0],
map->to_apply()->params()[0]->GetType(), "map operand element",
Expand Down

0 comments on commit 586178f

Please sign in to comment.