[SR-14503] Improve diagnostic on using try on the immediate RHS of an operator #56855
Labels
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
improvement
Additional Detail from JIRA
md5: aa7426c82efcb81c25f87e34587a5cbb
Issue Description:
The diagnostic wording is not quite accurate. In the second line, the
try
is still on the right of a non-assignment operator and that's alright, it is not on the immediate right.Maybe we should use "immediate right" instead? I'm not sure if that's too technical, maybe there's a better phrasing without sacrificing accuracy.
If we don't already, we could also provide a fix-it to add parens. (I didn't realize this is something you could do to fix the issue until today, normally I would hoist the
try
out to immediately follow the=
to resolve this issue).The text was updated successfully, but these errors were encountered: