| Index: pkg/analysis_server/lib/src/protocol.dart
|
| diff --git a/pkg/analysis_server/lib/src/protocol.dart b/pkg/analysis_server/lib/src/protocol.dart
|
| index 1f139e06b781b40d5d29e1eb0a0ac2cf2b3b7f05..e0b19b61d50f758cad1cefb72091c418ff72e444 100644
|
| --- a/pkg/analysis_server/lib/src/protocol.dart
|
| +++ b/pkg/analysis_server/lib/src/protocol.dart
|
| @@ -130,6 +130,9 @@ List<AnalysisError> _analysisErrorListFromEngine(engine.LineInfo lineInfo,
|
| * SourceEdit.apply().
|
| */
|
| String _applyEdit(String code, SourceEdit edit) {
|
| + if (edit.length < 0) {
|
| + throw new RangeError('length is negative');
|
| + }
|
| return code.substring(0, edit.offset) +
|
| edit.replacement +
|
| code.substring(edit.end);
|
|
|