Index: pkg/analyzer/lib/error/error.dart |
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart |
index 8a4f9e8e21cedaee417f8fe1261684e40950cdc1..59eb1c4c1ebf1e49909119450709d0168294b31f 100644 |
--- a/pkg/analyzer/lib/error/error.dart |
+++ b/pkg/analyzer/lib/error/error.dart |
@@ -13,8 +13,10 @@ import 'package:analyzer/src/error/codes.dart'; |
import 'package:analyzer/src/generated/java_core.dart'; |
import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode; |
import 'package:analyzer/src/generated/source.dart'; |
+import 'package:front_end/compilation_error.dart'; |
import 'package:front_end/src/base/errors.dart'; |
import 'package:front_end/src/scanner/errors.dart'; |
+import 'package:source_span/src/span.dart'; |
export 'package:front_end/src/base/errors.dart' |
show ErrorCode, ErrorSeverity, ErrorType; |
@@ -642,7 +644,7 @@ ErrorCode errorCodeByUniqueName(String uniqueName) { |
* |
* See [AnalysisErrorListener]. |
*/ |
-class AnalysisError { |
+class AnalysisError extends CompilationError { |
/** |
* An empty array of errors used when no errors are expected. |
*/ |
@@ -750,6 +752,9 @@ class AnalysisError { |
return hashCode; |
} |
+ @override |
+ SourceSpan get span => source.sourceFile.span(offset, offset + length); |
+ |
/** |
* Return the message to be displayed for this error. The message should |
* indicate what is wrong and why it is wrong. |