mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 12:48:10 +00:00
214cdbdc81
Previously it tested if it was at the end of file (defined as _currentLine >= _lines.length), if it was not it would try to read the _next_ line (_peek(1)), meaning that if _currentLine = _lines.length - 1 it would _peek(1) and try to read _lines[lines.length] and crash with a range error. This CL fixes it by actually checking if it can safely peek the amount it wants to. Change-Id: I2e66c539e823f0b39bd0da39e2b2277a9e6c9501 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150624 Commit-Queue: Bob Nystrom <rnystrom@google.com> Reviewed-by: Bob Nystrom <rnystrom@google.com> |
||
---|---|---|
.. | ||
dependency_graph_test.dart | ||
options_test.dart | ||
skipping_dart2js_compilations_helper.dart | ||
skipping_dart2js_compilations_test.dart | ||
static_error_test.dart | ||
test_file_test.dart | ||
test_runner_test.dart | ||
test_suite_test.dart | ||
update_errors_test.dart | ||
utils.dart |