mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 01:13:04 +00:00
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. R=brianwilkerson@google.com, paulberry@google.com Change-Id: Ief28b949cc0fe1ed71c91a4efa679d15fbb26a6d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110129 Reviewed-by: Paul Berry <paulberry@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
parent
71cd8a6efa
commit
2ada1edb59
|
@ -293,6 +293,9 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor {
|
|||
/// True if the 'dart:core' library is been summarized.
|
||||
bool isCoreLibrary = false;
|
||||
|
||||
/// True if the 'dart:core' library defining unit is been summarized.
|
||||
bool isCoreLibraryDefiningUnit = false;
|
||||
|
||||
/// True is a [PartOfDirective] was found, so the unit is a part.
|
||||
bool isPartOf = false;
|
||||
|
||||
|
@ -518,7 +521,7 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor {
|
|||
b.variables = variables;
|
||||
|
||||
b.publicNamespace = computePublicNamespace(compilationUnit);
|
||||
if (isCoreLibrary) {
|
||||
if (isCoreLibraryDefiningUnit) {
|
||||
b.publicNamespace.names.add(
|
||||
UnlinkedPublicNameBuilder(
|
||||
name: 'Never',
|
||||
|
@ -1395,6 +1398,7 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor {
|
|||
libraryNameOffset = node.name.offset;
|
||||
libraryNameLength = node.name.length;
|
||||
isCoreLibrary = libraryName == 'dart.core';
|
||||
isCoreLibraryDefiningUnit = isCoreLibrary;
|
||||
libraryDocumentationComment =
|
||||
serializeDocumentation(node.documentationComment);
|
||||
libraryAnnotations = serializeAnnotations(node.metadata);
|
||||
|
|
Loading…
Reference in a new issue