Make UnitElementResult to implement FileResult.

Change-Id: I853d65e4ac906710891eed5e586cfb2345f57f11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217802
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
diff --git a/pkg/analyzer/lib/dart/analysis/results.dart b/pkg/analyzer/lib/dart/analysis/results.dart
index a839b73..6bf41b7 100644
--- a/pkg/analyzer/lib/dart/analysis/results.dart
+++ b/pkg/analyzer/lib/dart/analysis/results.dart
@@ -340,8 +340,7 @@
 /// The result of building the element model for a single file.
 ///
 /// Clients may not extend, implement or mix-in this class.
-abstract class UnitElementResult
-    implements SomeUnitElementResult, AnalysisResult {
+abstract class UnitElementResult implements SomeUnitElementResult, FileResult {
   /// The element of the file.
   CompilationUnitElement get element;
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index ae20cd6..32ea11f 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -1500,6 +1500,8 @@
         currentSession,
         path,
         file.uri,
+        file.lineInfo,
+        file.isPart,
         library.transitiveSignature,
         element,
       );
diff --git a/pkg/analyzer/lib/src/dart/analysis/results.dart b/pkg/analyzer/lib/src/dart/analysis/results.dart
index e89beb5..5f03c26 100644
--- a/pkg/analyzer/lib/src/dart/analysis/results.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/results.dart
@@ -249,7 +249,7 @@
   TypeSystemImpl get typeSystem => libraryElement.typeSystem as TypeSystemImpl;
 }
 
-class UnitElementResultImpl extends AnalysisResultImpl
+class UnitElementResultImpl extends FileResultImpl
     implements UnitElementResult {
   @override
   final String signature;
@@ -258,8 +258,8 @@
   final CompilationUnitElement element;
 
   UnitElementResultImpl(AnalysisSession session, String path, Uri uri,
-      this.signature, this.element)
-      : super(session, path, uri);
+      LineInfo lineInfo, bool isPart, this.signature, this.element)
+      : super(session, path, uri, lineInfo, isPart);
 
   @Deprecated('Check for specific Result subtypes instead')
   @override