This improved the input validation of the default diagnostic formatter so that incorrectly created diagnostics with out-of-bounds range information won't cause a crash.
Dependencies
None.
Testing
Since this needs an incorrectly created diagnostic, it requires a bug that results in out-of-bounds diagnostics to test.
This comment includes a package that reproduces on such bug. Building it should no longer crash (although it will output a duplicate diagnostic, because that issue is not fixed in this PR).
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
[x] Added tests
[x] Ran the ./bin/test script and it succeeded
[x] ~Updated documentation if necessary~ Not applicable
Bug/issue #, if applicable: #729
Summary
This improved the input validation of the default diagnostic formatter so that incorrectly created diagnostics with out-of-bounds range information won't cause a crash.
Dependencies
None.
Testing
Since this needs an incorrectly created diagnostic, it requires a bug that results in out-of-bounds diagnostics to test.
This comment includes a package that reproduces on such bug. Building it should no longer crash (although it will output a duplicate diagnostic, because that issue is not fixed in this PR).
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
./bin/test
script and it succeeded