Skip to content

Commit

Permalink
Fix typo in error message. (#1125)
Browse files Browse the repository at this point in the history
Signed-off-by: gregmarr <[email protected]>
  • Loading branch information
gregmarr authored Jun 20, 2024
1 parent 54edaba commit ba5eaa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/to_cpp1.h
Original file line number Diff line number Diff line change
Expand Up @@ -6755,7 +6755,7 @@ class cppfront
if (n.has_wildcard_type()) {
errors.emplace_back(
n.identifier->position(),
"an object can have an anonymous name or an anonymous type, but not both at the same type (rationale: if '_ := f();' were allowed to keep the returned object alive, that syntax would be dangerously close to '_ = f();' to discard the returned object, and such importantly opposite meanings deserve more than a one-character typo distance; and explicit discarding gets the nice syntax because it's likely more common)"
"an object can have an anonymous name or an anonymous type, but not both at the same time (rationale: if '_ := f();' were allowed to keep the returned object alive, that syntax would be dangerously close to '_ = f();' to discard the returned object, and such importantly opposite meanings deserve more than a one-character typo distance; and explicit discarding gets the nice syntax because it's likely more common)"
);
return;
}
Expand Down

0 comments on commit ba5eaa9

Please sign in to comment.