Skip to content

Commit

Permalink
do not clone_to_move workhorse types
Browse files Browse the repository at this point in the history
  • Loading branch information
borisbat committed Jan 27, 2025
1 parent 719ea04 commit 3396b1d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ast/ast_infer_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7510,7 +7510,13 @@ namespace das {
}
} else {
if ( var->init_via_clone ) {
return promoteToCloneToMove(var);
if ( var->init->type->isWorkhorseType() ) {
var->init_via_clone = false;
var->init_via_move = false;
reportAstChanged();
} else {
return promoteToCloneToMove(var);
}
}
}
return Visitor::visitLetInit(expr, var, init);
Expand Down

0 comments on commit 3396b1d

Please sign in to comment.