File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -427,17 +427,18 @@ class FunctionCreator : public ExprMutator {
427427 }
428428
429429 for (const Expr& arg : call->args ) {
430- if (GetStructInfoAs<TupleStructInfoNode>(arg) != nullptr ) {
431- // The argument is fully referenced. Thus we remove it from the mapping.
432- partially_used_tuple_params_.erase (arg.get ());
433- const Tuple& tup_args = Downcast<Tuple>(arg);
434- for (const Expr& tup_arg : tup_args->fields ) {
430+ if (auto tuple = arg.as <TupleNode>()) {
431+ for (const Expr& tup_arg : tuple->fields ) {
435432 CheckDefAndUpdateParam (tup_arg);
436433 ICHECK (GetStructInfoAs<TupleStructInfoNode>(tup_arg) == nullptr );
437434 }
438435 } else {
439436 CheckDefAndUpdateParam (arg);
440437 }
438+ if (GetStructInfoAs<TupleStructInfoNode>(arg) != nullptr ) {
439+ // The argument is fully referenced. Thus we remove it from the mapping.
440+ partially_used_tuple_params_.erase (arg.get ());
441+ }
441442 }
442443 }
443444 } else if (var_binding->value .as <TupleGetItemNode>()) {
You can’t perform that action at this time.
0 commit comments