Skip to content

Commit 2ada1ed

Browse files
scheglovcommit-bot@chromium.org
authored andcommitted
Fix for 'Never' in dart:core and summary1.
We should add it only to the defining unit of dart:core, otherwise we get it in every unit, which is a conflict, and it is still unresolved. [email protected], [email protected] Change-Id: Ief28b949cc0fe1ed71c91a4efa679d15fbb26a6d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110129 Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
1 parent 71cd8a6 commit 2ada1ed

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/analyzer/lib/src/summary/summarize_ast.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,9 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor {
293293
/// True if the 'dart:core' library is been summarized.
294294
bool isCoreLibrary = false;
295295

296+
/// True if the 'dart:core' library defining unit is been summarized.
297+
bool isCoreLibraryDefiningUnit = false;
298+
296299
/// True is a [PartOfDirective] was found, so the unit is a part.
297300
bool isPartOf = false;
298301

@@ -518,7 +521,7 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor {
518521
b.variables = variables;
519522

520523
b.publicNamespace = computePublicNamespace(compilationUnit);
521-
if (isCoreLibrary) {
524+
if (isCoreLibraryDefiningUnit) {
522525
b.publicNamespace.names.add(
523526
UnlinkedPublicNameBuilder(
524527
name: 'Never',
@@ -1395,6 +1398,7 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor {
13951398
libraryNameOffset = node.name.offset;
13961399
libraryNameLength = node.name.length;
13971400
isCoreLibrary = libraryName == 'dart.core';
1401+
isCoreLibraryDefiningUnit = isCoreLibrary;
13981402
libraryDocumentationComment =
13991403
serializeDocumentation(node.documentationComment);
14001404
libraryAnnotations = serializeAnnotations(node.metadata);

0 commit comments

Comments
 (0)