Version 2.18.0-276.0.dev
Merge commit 'f6aaa72e58b0d11d4ae9d84037bbacc17807e7d5' into 'dev'
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart b/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart
index 7c94a5a..11c4141 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart
@@ -20,12 +20,7 @@
import '../builder/type_alias_builder.dart';
import '../fasta_codes.dart'
- show
- Message,
- noLength,
- templateDuplicatedDeclaration,
- templateTypeNotFound,
- templateUnspecified;
+ show Message, noLength, templateDuplicatedDeclaration, templateUnspecified;
import '../kernel/constructor_tearoff_lowering.dart';
import '../kernel/redirecting_factory_body.dart'
@@ -34,6 +29,7 @@
getRedirectingFactories,
isRedirectingFactoryField;
+import '../kernel/utils.dart';
import '../problems.dart' show internalProblem, unhandled, unimplemented;
import '../scope.dart';
@@ -215,7 +211,7 @@
return null;
}
String name = member.name.text;
- if (name == "_exports#") {
+ if (name == unserializableExportName) {
Field field = member as Field;
String stringValue;
if (field.initializer is ConstantExpression) {
@@ -325,25 +321,22 @@
void finalizeExports() {
unserializableExports?.forEach((String name, String messageText) {
Builder declaration;
- switch (name) {
- case "dynamic":
- case "void":
- // TODO(ahe): It's likely that we shouldn't be exporting these types
- // from dart:core, and this case can be removed.
- declaration = loader.coreLibrary.exportScope
- .lookupLocalMember(name, setter: false)!;
- break;
-
- default:
- // ignore: unnecessary_null_comparison
- Message message = messageText == null
- ? templateTypeNotFound.withArguments(name)
- : templateUnspecified.withArguments(messageText);
- if (!suppressFinalizationErrors) {
- addProblem(message, -1, noLength, null);
- }
- declaration = new InvalidTypeDeclarationBuilder(
- name, message.withoutLocation());
+ if (messageText == exportDynamicSentinel) {
+ assert(
+ name == 'dynamic', "Unexpected export name for 'dynamic': '$name'");
+ declaration = loader.coreLibrary.exportScope
+ .lookupLocalMember(name, setter: false)!;
+ } else if (messageText == exportNeverSentinel) {
+ assert(name == 'Never', "Unexpected export name for 'Never': '$name'");
+ declaration = loader.coreLibrary.exportScope
+ .lookupLocalMember(name, setter: false)!;
+ } else {
+ Message message = templateUnspecified.withArguments(messageText);
+ if (!suppressFinalizationErrors) {
+ addProblem(message, -1, noLength, null);
+ }
+ declaration =
+ new InvalidTypeDeclarationBuilder(name, message.withoutLocation());
}
exportScope.addLocalMember(name, declaration, setter: false);
});
diff --git a/pkg/front_end/lib/src/fasta/kernel/utils.dart b/pkg/front_end/lib/src/fasta/kernel/utils.dart
index c5a343b..1248d20 100644
--- a/pkg/front_end/lib/src/fasta/kernel/utils.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/utils.dart
@@ -28,6 +28,22 @@
import '../source/source_library_builder.dart';
import 'body_builder.dart';
+/// The name for the synthesized field used to store information of
+/// unserializable exports in a [Library].
+///
+/// For instance, if a [Library] tries to export two declarations with the same
+/// name, the unserializable exports will map this name to the corresponding
+/// error message.
+const String unserializableExportName = '_exports#';
+
+/// Sentinel value used in unserializable exports to signal an export of
+/// 'dynamic' from 'dart:core'.
+const String exportDynamicSentinel = '<dynamic>';
+
+/// Sentinel value used in unserializable exports to signal an export of
+/// 'Never' from 'dart:core'.
+const String exportNeverSentinel = '<Never>';
+
void printNodeOn(Node? node, StringSink sink, {NameSystem? syntheticNames}) {
if (node == null) {
sink.write("null");
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index d35c1b8..f0a88713 100644
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -79,7 +79,13 @@
getNonSimplicityIssuesForDeclaration,
getNonSimplicityIssuesForTypeVariables,
pendingVariance;
-import '../kernel/utils.dart' show compareProcedures, toKernelCombinators;
+import '../kernel/utils.dart'
+ show
+ compareProcedures,
+ exportDynamicSentinel,
+ exportNeverSentinel,
+ toKernelCombinators,
+ unserializableExportName;
import '../modifier.dart'
show
abstractMask,
@@ -211,12 +217,13 @@
///
/// The key is the name of the exported member.
///
- /// If the name is `dynamic` or `void`, this library reexports the
- /// corresponding type from `dart:core`, and the value is null.
+ /// If the name is `dynamic` or `Never`, this library reexports the
+ /// corresponding type from `dart:core`, and the value is the sentinel values
+ /// [exportDynamicSentinel] or [exportNeverSentinel], respectively.
///
/// Otherwise, this represents an error (an ambiguous export). In this case,
/// the error message is the corresponding value in the map.
- Map<String, String?>? unserializableExports;
+ Map<String, String>? unserializableExports;
/// The language version of this library as defined by the language version
/// of the package it belongs to, if present, or the current language version
@@ -1072,7 +1079,7 @@
library.procedures.sort(compareProcedures);
if (unserializableExports != null) {
- Name fieldName = new Name("_exports#", library);
+ Name fieldName = new Name(unserializableExportName, library);
Reference? fieldReference =
referencesFromIndexed?.lookupFieldReference(fieldName);
Reference? getterReference =
@@ -1375,52 +1382,52 @@
exportScope.forEach((String name, Builder member) {
if (member.parent != this) {
- switch (name) {
- case "dynamic":
- case "void":
- case "Never":
- unserializableExports ??= <String, String?>{};
- unserializableExports![name] = null;
- break;
-
- default:
- if (member is InvalidTypeDeclarationBuilder) {
- unserializableExports ??= <String, String>{};
- unserializableExports![name] = member.message.problemMessage;
- } else {
- // Eventually (in #buildBuilder) members aren't added to the
- // library if the have 'next' pointers, so don't add them as
- // additionalExports either. Add the last one only (the one that
- // will eventually be added to the library).
- Builder memberLast = member;
- while (memberLast.next != null) {
- memberLast = memberLast.next!;
- }
- if (memberLast is ClassBuilder) {
- library.additionalExports.add(memberLast.cls.reference);
- } else if (memberLast is TypeAliasBuilder) {
- library.additionalExports.add(memberLast.typedef.reference);
- } else if (memberLast is ExtensionBuilder) {
- library.additionalExports.add(memberLast.extension.reference);
- } else if (memberLast is MemberBuilder) {
- for (Member member in memberLast.exportedMembers) {
- if (member is Field) {
- // For fields add both getter and setter references
- // so replacing a field with a getter/setter pair still
- // exports correctly.
- library.additionalExports.add(member.getterReference);
- if (member.hasSetter) {
- library.additionalExports.add(member.setterReference!);
- }
- } else {
- library.additionalExports.add(member.reference);
- }
- }
- } else {
- unhandled('member', 'exportScope', memberLast.charOffset,
- memberLast.fileUri);
- }
+ if (member is DynamicTypeDeclarationBuilder) {
+ assert(name == 'dynamic',
+ "Unexpected export name for 'dynamic': '$name'");
+ (unserializableExports ??= {})[name] = exportDynamicSentinel;
+ } else if (member is NeverTypeDeclarationBuilder) {
+ assert(
+ name == 'Never', "Unexpected export name for 'Never': '$name'");
+ (unserializableExports ??= {})[name] = exportNeverSentinel;
+ } else {
+ if (member is InvalidTypeDeclarationBuilder) {
+ (unserializableExports ??= {})[name] =
+ member.message.problemMessage;
+ } else {
+ // Eventually (in #buildBuilder) members aren't added to the
+ // library if the have 'next' pointers, so don't add them as
+ // additionalExports either. Add the last one only (the one that
+ // will eventually be added to the library).
+ Builder memberLast = member;
+ while (memberLast.next != null) {
+ memberLast = memberLast.next!;
}
+ if (memberLast is ClassBuilder) {
+ library.additionalExports.add(memberLast.cls.reference);
+ } else if (memberLast is TypeAliasBuilder) {
+ library.additionalExports.add(memberLast.typedef.reference);
+ } else if (memberLast is ExtensionBuilder) {
+ library.additionalExports.add(memberLast.extension.reference);
+ } else if (memberLast is MemberBuilder) {
+ for (Member member in memberLast.exportedMembers) {
+ if (member is Field) {
+ // For fields add both getter and setter references
+ // so replacing a field with a getter/setter pair still
+ // exports correctly.
+ library.additionalExports.add(member.getterReference);
+ if (member.hasSetter) {
+ library.additionalExports.add(member.setterReference!);
+ }
+ } else {
+ library.additionalExports.add(member.reference);
+ }
+ }
+ } else {
+ unhandled('member', 'exportScope', memberLast.charOffset,
+ memberLast.fileUri);
+ }
+ }
}
}
});
diff --git a/pkg/front_end/test/fasta/ambiguous_export_test.dart b/pkg/front_end/test/fasta/ambiguous_export_test.dart
index 2b9dc15..9ac4112 100644
--- a/pkg/front_end/test/fasta/ambiguous_export_test.dart
+++ b/pkg/front_end/test/fasta/ambiguous_export_test.dart
@@ -15,6 +15,8 @@
import 'package:front_end/src/fasta/dill/dill_target.dart' show DillTarget;
+import 'package:front_end/src/fasta/kernel/utils.dart';
+
import 'package:kernel/ast.dart'
show Field, Library, Name, Component, StringLiteral;
@@ -22,7 +24,8 @@
await asyncTest(() async {
Uri uri = Uri.parse("org.dartlang.fasta:library");
Library library = new Library(uri, fileUri: uri);
- Field field = new Field.immutable(new Name("_exports#", library),
+ Field field = new Field.immutable(
+ new Name(unserializableExportName, library),
initializer: new StringLiteral('{"main":"Problem with main"}'),
fileUri: library.fileUri);
library.addField(field);
diff --git a/pkg/front_end/testcases/general/error_export_from_dill/main.dart b/pkg/front_end/testcases/general/error_export_from_dill/main.dart
new file mode 100644
index 0000000..147fd11
--- /dev/null
+++ b/pkg/front_end/testcases/general/error_export_from_dill/main.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE.md file.
+
+import 'main_lib1.dart' as exported;
+import 'dart:core' as imported;
+import 'main_lib2.dart' as imported;
+import 'main_lib3.dart' as imported;
+
+testImported() {
+ void f(imported.dynamic d) {}
+ imported.Never n;
+ <imported.Never>[];
+ imported.Duplicate d;
+ new imported.Duplicate();
+ <imported.Duplicate>[];
+ imported.NonExisting e;
+ new imported.NonExisting();
+ <imported.NonExisting>[];
+}
+
+testExported() {
+ void f(exported.dynamic d) {}
+ exported.Never n;
+ <exported.Never>[];
+ exported.Duplicate d;
+ new exported.Duplicate();
+ <exported.Duplicate>[];
+ exported.NonExisting e;
+ new exported.NonExisting();
+ <exported.NonExisting>[];
+}
diff --git a/pkg/front_end/testcases/general/error_export_from_dill/main.dart.textual_outline.expect b/pkg/front_end/testcases/general/error_export_from_dill/main.dart.textual_outline.expect
new file mode 100644
index 0000000..c0f4ea5
--- /dev/null
+++ b/pkg/front_end/testcases/general/error_export_from_dill/main.dart.textual_outline.expect
@@ -0,0 +1,7 @@
+import 'main_lib1.dart' as exported;
+import 'dart:core' as imported;
+import 'main_lib2.dart' as imported;
+import 'main_lib3.dart' as imported;
+
+testImported() {}
+testExported() {}
diff --git a/pkg/front_end/testcases/general/error_export_from_dill/main.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/error_export_from_dill/main.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..0d1eb18
--- /dev/null
+++ b/pkg/front_end/testcases/general/error_export_from_dill/main.dart.textual_outline_modelled.expect
@@ -0,0 +1,7 @@
+import 'dart:core' as imported;
+import 'main_lib1.dart' as exported;
+import 'main_lib2.dart' as imported;
+import 'main_lib3.dart' as imported;
+
+testExported() {}
+testImported() {}
diff --git a/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.expect b/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.expect
new file mode 100644
index 0000000..2a15575
--- /dev/null
+++ b/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.expect
@@ -0,0 +1,200 @@
+//
+// Problems outside component:
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main_lib1.dart: Error: 'Duplicate' is exported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+//
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:8:28: Error: 'Duplicate' is imported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+// import 'main_lib3.dart' as imported;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:15:7: Error: 'Duplicate' is imported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+// new imported.Duplicate();
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:17:12: Error: 'NonExisting' isn't a type.
+// imported.NonExisting e;
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:18:16: Error: Couldn't find constructor 'NonExisting'.
+// new imported.NonExisting();
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:19:13: Error: 'NonExisting' isn't a type.
+// <imported.NonExisting>[];
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:27:7: Error: 'Duplicate' is exported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+// new exported.Duplicate();
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:29:12: Error: 'NonExisting' isn't a type.
+// exported.NonExisting e;
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:30:16: Error: Couldn't find constructor 'NonExisting'.
+// new exported.NonExisting();
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:31:13: Error: 'NonExisting' isn't a type.
+// <exported.NonExisting>[];
+// ^^^^^^^^^^^
+//
+import self as self;
+
+import "org-dartlang-testcase:///main_lib1.dart" as exported;
+import "dart:core" as imported;
+import "org-dartlang-testcase:///main_lib2.dart" as imported;
+import "org-dartlang-testcase:///main_lib3.dart" as imported;
+
+static method testImported() → dynamic {
+ function f(dynamic d) → void {}
+ Never n;
+ <Never>[];
+ invalid-type d;
+ invalid-expression "pkg/front_end/testcases/general/error_export_from_dill/main.dart:15:7: Error: 'Duplicate' is imported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+ new imported.Duplicate();
+ ^^^^^^^^";
+ <invalid-type>[];
+ invalid-type e;
+ invalid-expression "pkg/front_end/testcases/general/error_export_from_dill/main.dart:18:16: Error: Couldn't find constructor 'NonExisting'.
+ new imported.NonExisting();
+ ^^^^^^^^^^^";
+ <invalid-type>[];
+}
+static method testExported() → dynamic {
+ function f(dynamic d) → void {}
+ Never n;
+ <Never>[];
+ invalid-type d;
+ invalid-expression "pkg/front_end/testcases/general/error_export_from_dill/main.dart:27:7: Error: 'Duplicate' is exported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+ new exported.Duplicate();
+ ^^^^^^^^";
+ <invalid-type>[];
+ invalid-type e;
+ invalid-expression "pkg/front_end/testcases/general/error_export_from_dill/main.dart:30:16: Error: Couldn't find constructor 'NonExisting'.
+ new exported.NonExisting();
+ ^^^^^^^^^^^";
+ <invalid-type>[];
+}
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main_lib1.dart:7:1: Error: 'Duplicate' is exported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+// export 'main_lib3.dart';
+// ^
+//
+import self as self2;
+import "dart:core" as core;
+import "dart:async" as asy;
+additionalExports = (core::Deprecated,
+ core::Provisional,
+ core::pragma,
+ core::BigInt,
+ core::bool,
+ core::Comparable,
+ core::DateTime,
+ core::double,
+ core::Duration,
+ core::Enum,
+ core::Error,
+ core::AssertionError,
+ core::TypeError,
+ core::CastError,
+ core::NullThrownError,
+ core::ArgumentError,
+ core::RangeError,
+ core::IndexError,
+ core::FallThroughError,
+ core::AbstractClassInstantiationError,
+ core::NoSuchMethodError,
+ core::UnsupportedError,
+ core::UnimplementedError,
+ core::StateError,
+ core::ConcurrentModificationError,
+ core::OutOfMemoryError,
+ core::StackOverflowError,
+ core::CyclicInitializationError,
+ core::Exception,
+ core::FormatException,
+ core::IntegerDivisionByZeroException,
+ core::Function,
+ core::int,
+ core::Invocation,
+ core::Iterable,
+ core::BidirectionalIterator,
+ core::Iterator,
+ core::List,
+ core::Map,
+ core::MapEntry,
+ core::Null,
+ core::num,
+ core::Object,
+ core::Pattern,
+ core::Match,
+ core::RegExp,
+ core::RegExpMatch,
+ core::Set,
+ core::Sink,
+ core::StackTrace,
+ core::Stopwatch,
+ core::String,
+ core::Runes,
+ core::RuneIterator,
+ core::StringBuffer,
+ core::StringSink,
+ core::Symbol,
+ core::Type,
+ core::Uri,
+ core::UriData,
+ core::Expando,
+ core::WeakReference,
+ core::Finalizer,
+ core::EnumName,
+ core::EnumByName,
+ core::identical,
+ core::identityHashCode,
+ core::print,
+ core::Comparator,
+ core::deprecated,
+ core::override,
+ core::provisional,
+ core::proxy,
+ asy::Future,
+ asy::Stream,
+ asy::FutureExtensions)
+
+export "dart:core";
+export "org-dartlang-testcase:///main_lib2.dart";
+export "org-dartlang-testcase:///main_lib3.dart";
+
+static const field dynamic _exports# = #C1 /*isLegacy*/;
+
+library /*isNonNullableByDefault*/;
+import self as self3;
+import "dart:core" as core;
+
+class Duplicate extends core::Object {
+ synthetic constructor •() → self3::Duplicate
+ : super core::Object::•()
+ ;
+}
+
+library /*isNonNullableByDefault*/;
+import self as self4;
+import "dart:core" as core;
+
+class Duplicate extends core::Object {
+ synthetic constructor •() → self4::Duplicate
+ : super core::Object::•()
+ ;
+}
+
+constants {
+ #C1 = "{\"Duplicate\":\"'Duplicate' is exported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.\",\"dynamic\":\"<dynamic>\",\"Never\":\"<Never>\"}"
+}
diff --git a/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.modular.expect b/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.modular.expect
new file mode 100644
index 0000000..3bb33905
--- /dev/null
+++ b/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.modular.expect
@@ -0,0 +1,82 @@
+//
+// Problems outside component:
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main_lib1.dart: Error: 'Duplicate' is exported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+//
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:8:28: Error: 'Duplicate' is imported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+// import 'main_lib3.dart' as imported;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:15:7: Error: 'Duplicate' is imported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+// new imported.Duplicate();
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:17:12: Error: 'NonExisting' isn't a type.
+// imported.NonExisting e;
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:18:16: Error: Couldn't find constructor 'NonExisting'.
+// new imported.NonExisting();
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:19:13: Error: 'NonExisting' isn't a type.
+// <imported.NonExisting>[];
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:27:7: Error: 'Duplicate' is exported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+// new exported.Duplicate();
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:29:12: Error: 'NonExisting' isn't a type.
+// exported.NonExisting e;
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:30:16: Error: Couldn't find constructor 'NonExisting'.
+// new exported.NonExisting();
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:31:13: Error: 'NonExisting' isn't a type.
+// <exported.NonExisting>[];
+// ^^^^^^^^^^^
+//
+import self as self;
+
+import "org-dartlang-testcase:///main_lib1.dart" as exported;
+import "dart:core" as imported;
+import "org-dartlang-testcase:///main_lib2.dart" as imported;
+import "org-dartlang-testcase:///main_lib3.dart" as imported;
+
+static method testImported() → dynamic {
+ function f(dynamic d) → void {}
+ Never n;
+ <Never>[];
+ invalid-type d;
+ invalid-expression "pkg/front_end/testcases/general/error_export_from_dill/main.dart:15:7: Error: 'Duplicate' is imported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+ new imported.Duplicate();
+ ^^^^^^^^";
+ <invalid-type>[];
+ invalid-type e;
+ invalid-expression "pkg/front_end/testcases/general/error_export_from_dill/main.dart:18:16: Error: Couldn't find constructor 'NonExisting'.
+ new imported.NonExisting();
+ ^^^^^^^^^^^";
+ <invalid-type>[];
+}
+static method testExported() → dynamic {
+ function f(dynamic d) → void {}
+ Never n;
+ <Never>[];
+ invalid-type d;
+ invalid-expression "pkg/front_end/testcases/general/error_export_from_dill/main.dart:27:7: Error: 'Duplicate' is exported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+ new exported.Duplicate();
+ ^^^^^^^^";
+ <invalid-type>[];
+ invalid-type e;
+ invalid-expression "pkg/front_end/testcases/general/error_export_from_dill/main.dart:30:16: Error: Couldn't find constructor 'NonExisting'.
+ new exported.NonExisting();
+ ^^^^^^^^^^^";
+ <invalid-type>[];
+}
diff --git a/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.outline.expect b/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.outline.expect
new file mode 100644
index 0000000..1f957bf
--- /dev/null
+++ b/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.outline.expect
@@ -0,0 +1,133 @@
+//
+// Problems outside component:
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main_lib1.dart: Error: 'Duplicate' is exported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+//
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "org-dartlang-testcase:///main_lib1.dart" as exported;
+import "dart:core" as imported;
+import "org-dartlang-testcase:///main_lib2.dart" as imported;
+import "org-dartlang-testcase:///main_lib3.dart" as imported;
+
+static method testImported() → dynamic
+ ;
+static method testExported() → dynamic
+ ;
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main_lib1.dart:7:1: Error: 'Duplicate' is exported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+// export 'main_lib3.dart';
+// ^
+//
+import self as self2;
+import "dart:core" as core;
+import "dart:async" as asy;
+additionalExports = (core::Deprecated,
+ core::Provisional,
+ core::pragma,
+ core::BigInt,
+ core::bool,
+ core::Comparable,
+ core::DateTime,
+ core::double,
+ core::Duration,
+ core::Enum,
+ core::Error,
+ core::AssertionError,
+ core::TypeError,
+ core::CastError,
+ core::NullThrownError,
+ core::ArgumentError,
+ core::RangeError,
+ core::IndexError,
+ core::FallThroughError,
+ core::AbstractClassInstantiationError,
+ core::NoSuchMethodError,
+ core::UnsupportedError,
+ core::UnimplementedError,
+ core::StateError,
+ core::ConcurrentModificationError,
+ core::OutOfMemoryError,
+ core::StackOverflowError,
+ core::CyclicInitializationError,
+ core::Exception,
+ core::FormatException,
+ core::IntegerDivisionByZeroException,
+ core::Function,
+ core::int,
+ core::Invocation,
+ core::Iterable,
+ core::BidirectionalIterator,
+ core::Iterator,
+ core::List,
+ core::Map,
+ core::MapEntry,
+ core::Null,
+ core::num,
+ core::Object,
+ core::Pattern,
+ core::Match,
+ core::RegExp,
+ core::RegExpMatch,
+ core::Set,
+ core::Sink,
+ core::StackTrace,
+ core::Stopwatch,
+ core::String,
+ core::Runes,
+ core::RuneIterator,
+ core::StringBuffer,
+ core::StringSink,
+ core::Symbol,
+ core::Type,
+ core::Uri,
+ core::UriData,
+ core::Expando,
+ core::WeakReference,
+ core::Finalizer,
+ core::EnumName,
+ core::EnumByName,
+ core::identical,
+ core::identityHashCode,
+ core::print,
+ core::Comparator,
+ core::deprecated,
+ core::override,
+ core::provisional,
+ core::proxy,
+ asy::Future,
+ asy::Stream,
+ asy::FutureExtensions)
+
+export "dart:core";
+export "org-dartlang-testcase:///main_lib2.dart";
+export "org-dartlang-testcase:///main_lib3.dart";
+
+static const field dynamic _exports# = #C1 /*isLegacy*/;
+
+library /*isNonNullableByDefault*/;
+import self as self3;
+import "dart:core" as core;
+
+class Duplicate extends core::Object {
+ synthetic constructor •() → self3::Duplicate
+ ;
+}
+
+library /*isNonNullableByDefault*/;
+import self as self4;
+import "dart:core" as core;
+
+class Duplicate extends core::Object {
+ synthetic constructor •() → self4::Duplicate
+ ;
+}
+
+constants {
+ #C1 = "{\"Duplicate\":\"'Duplicate' is exported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.\",\"dynamic\":\"<dynamic>\",\"Never\":\"<Never>\"}"
+}
diff --git a/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.transformed.expect b/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.transformed.expect
new file mode 100644
index 0000000..88fc5d2
--- /dev/null
+++ b/pkg/front_end/testcases/general/error_export_from_dill/main.dart.weak.transformed.expect
@@ -0,0 +1,196 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:8:28: Error: 'Duplicate' is imported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+// import 'main_lib3.dart' as imported;
+// ^^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:15:7: Error: 'Duplicate' is imported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+// new imported.Duplicate();
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:17:12: Error: 'NonExisting' isn't a type.
+// imported.NonExisting e;
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:18:16: Error: Couldn't find constructor 'NonExisting'.
+// new imported.NonExisting();
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:19:13: Error: 'NonExisting' isn't a type.
+// <imported.NonExisting>[];
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:27:7: Error: 'Duplicate' is exported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+// new exported.Duplicate();
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:29:12: Error: 'NonExisting' isn't a type.
+// exported.NonExisting e;
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:30:16: Error: Couldn't find constructor 'NonExisting'.
+// new exported.NonExisting();
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main.dart:31:13: Error: 'NonExisting' isn't a type.
+// <exported.NonExisting>[];
+// ^^^^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///main_lib1.dart" as exported;
+import "dart:core" as imported;
+import "org-dartlang-testcase:///main_lib2.dart" as imported;
+import "org-dartlang-testcase:///main_lib3.dart" as imported;
+
+static method testImported() → dynamic {
+ function f(dynamic d) → void {}
+ Never n;
+ core::_GrowableList::•<Never>(0);
+ invalid-type d;
+ invalid-expression "pkg/front_end/testcases/general/error_export_from_dill/main.dart:15:7: Error: 'Duplicate' is imported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+ new imported.Duplicate();
+ ^^^^^^^^";
+ core::_GrowableList::•<invalid-type>(0);
+ invalid-type e;
+ invalid-expression "pkg/front_end/testcases/general/error_export_from_dill/main.dart:18:16: Error: Couldn't find constructor 'NonExisting'.
+ new imported.NonExisting();
+ ^^^^^^^^^^^";
+ core::_GrowableList::•<invalid-type>(0);
+}
+static method testExported() → dynamic {
+ function f(dynamic d) → void {}
+ Never n;
+ core::_GrowableList::•<Never>(0);
+ invalid-type d;
+ invalid-expression "pkg/front_end/testcases/general/error_export_from_dill/main.dart:27:7: Error: 'Duplicate' is exported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+ new exported.Duplicate();
+ ^^^^^^^^";
+ core::_GrowableList::•<invalid-type>(0);
+ invalid-type e;
+ invalid-expression "pkg/front_end/testcases/general/error_export_from_dill/main.dart:30:16: Error: Couldn't find constructor 'NonExisting'.
+ new exported.NonExisting();
+ ^^^^^^^^^^^";
+ core::_GrowableList::•<invalid-type>(0);
+}
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/error_export_from_dill/main_lib1.dart:7:1: Error: 'Duplicate' is exported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.
+// export 'main_lib3.dart';
+// ^
+//
+import self as self2;
+import "dart:core" as core;
+import "dart:async" as asy;
+additionalExports = (core::Deprecated,
+ core::Provisional,
+ core::pragma,
+ core::BigInt,
+ core::bool,
+ core::Comparable,
+ core::DateTime,
+ core::double,
+ core::Duration,
+ core::Enum,
+ core::Error,
+ core::AssertionError,
+ core::TypeError,
+ core::CastError,
+ core::NullThrownError,
+ core::ArgumentError,
+ core::RangeError,
+ core::IndexError,
+ core::FallThroughError,
+ core::AbstractClassInstantiationError,
+ core::NoSuchMethodError,
+ core::UnsupportedError,
+ core::UnimplementedError,
+ core::StateError,
+ core::ConcurrentModificationError,
+ core::OutOfMemoryError,
+ core::StackOverflowError,
+ core::CyclicInitializationError,
+ core::Exception,
+ core::FormatException,
+ core::IntegerDivisionByZeroException,
+ core::Function,
+ core::int,
+ core::Invocation,
+ core::Iterable,
+ core::BidirectionalIterator,
+ core::Iterator,
+ core::List,
+ core::Map,
+ core::MapEntry,
+ core::Null,
+ core::num,
+ core::Object,
+ core::Pattern,
+ core::Match,
+ core::RegExp,
+ core::RegExpMatch,
+ core::Set,
+ core::Sink,
+ core::StackTrace,
+ core::Stopwatch,
+ core::String,
+ core::Runes,
+ core::RuneIterator,
+ core::StringBuffer,
+ core::StringSink,
+ core::Symbol,
+ core::Type,
+ core::Uri,
+ core::UriData,
+ core::Expando,
+ core::WeakReference,
+ core::Finalizer,
+ core::EnumName,
+ core::EnumByName,
+ core::identical,
+ core::identityHashCode,
+ core::print,
+ core::Comparator,
+ core::deprecated,
+ core::override,
+ core::provisional,
+ core::proxy,
+ asy::Future,
+ asy::Stream,
+ asy::FutureExtensions)
+
+export "dart:core";
+export "org-dartlang-testcase:///main_lib2.dart";
+export "org-dartlang-testcase:///main_lib3.dart";
+
+static const field dynamic _exports# = #C1 /*isLegacy*/;
+
+library /*isNonNullableByDefault*/;
+import self as self3;
+import "dart:core" as core;
+
+class Duplicate extends core::Object {
+ synthetic constructor •() → self3::Duplicate
+ : super core::Object::•()
+ ;
+}
+
+library /*isNonNullableByDefault*/;
+import self as self4;
+import "dart:core" as core;
+
+class Duplicate extends core::Object {
+ synthetic constructor •() → self4::Duplicate
+ : super core::Object::•()
+ ;
+}
+
+constants {
+ #C1 = "{\"Duplicate\":\"'Duplicate' is exported from both 'pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart'.\",\"dynamic\":\"<dynamic>\",\"Never\":\"<Never>\"}"
+}
diff --git a/pkg/front_end/testcases/general/error_export_from_dill/main_lib1.dart b/pkg/front_end/testcases/general/error_export_from_dill/main_lib1.dart
new file mode 100644
index 0000000..cc3df2c
--- /dev/null
+++ b/pkg/front_end/testcases/general/error_export_from_dill/main_lib1.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE.md file.
+
+export 'dart:core';
+export 'main_lib2.dart';
+export 'main_lib3.dart';
diff --git a/pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart b/pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart
new file mode 100644
index 0000000..0e103f5
--- /dev/null
+++ b/pkg/front_end/testcases/general/error_export_from_dill/main_lib2.dart
@@ -0,0 +1,5 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE.md file.
+
+class Duplicate {}
diff --git a/pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart b/pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart
new file mode 100644
index 0000000..0e103f5
--- /dev/null
+++ b/pkg/front_end/testcases/general/error_export_from_dill/main_lib3.dart
@@ -0,0 +1,5 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE.md file.
+
+class Duplicate {}
diff --git a/pkg/front_end/testcases/general/error_export_from_dill/test.options b/pkg/front_end/testcases/general/error_export_from_dill/test.options
new file mode 100644
index 0000000..a635300
--- /dev/null
+++ b/pkg/front_end/testcases/general/error_export_from_dill/test.options
@@ -0,0 +1,3 @@
+main_lib1.dart
+main_lib2.dart
+main_lib3.dart
\ No newline at end of file
diff --git a/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart b/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart
new file mode 100644
index 0000000..dec7463
--- /dev/null
+++ b/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE.md file.
+
+import 'main_lib1.dart' as exported;
+import 'main_lib2.dart' as lib2;
+import 'main_lib3.dart' as lib3;
+import 'main_lib4.dart' as lib4;
+
+test() {
+ new exported.Never();
+ exported.Never n1;
+ <exported.Never>[];
+ new exported.dynamic();
+ exported.dynamic d1;
+ <exported.dynamic>[];
+
+ new lib2.Never();
+ lib2.Never n2;
+ <lib2.Never>[];
+ new lib2.dynamic();
+ lib2.dynamic d2;
+ <lib2.dynamic>[];
+
+ new lib3.Never();
+ lib3.Never n3;
+ <lib3.Never>[];
+ new lib3.dynamic();
+ lib3.dynamic d3;
+ <lib3.dynamic>[];
+
+ new lib4.Never();
+ lib4.Never n4;
+ <lib4.Never>[];
+ new lib4.dynamic();
+ lib4.dynamic d4;
+ <lib4.dynamic>[];
+}
diff --git a/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart.textual_outline.expect b/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart.textual_outline.expect
new file mode 100644
index 0000000..96e1684
--- /dev/null
+++ b/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart.textual_outline.expect
@@ -0,0 +1,6 @@
+import 'main_lib1.dart' as exported;
+import 'main_lib2.dart' as lib2;
+import 'main_lib3.dart' as lib3;
+import 'main_lib4.dart' as lib4;
+
+test() {}
diff --git a/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..96e1684
--- /dev/null
+++ b/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart.textual_outline_modelled.expect
@@ -0,0 +1,6 @@
+import 'main_lib1.dart' as exported;
+import 'main_lib2.dart' as lib2;
+import 'main_lib3.dart' as lib3;
+import 'main_lib4.dart' as lib4;
+
+test() {}
diff --git a/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart.weak.expect b/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart.weak.expect
new file mode 100644
index 0000000..f947ae0
--- /dev/null
+++ b/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart.weak.expect
@@ -0,0 +1,135 @@
+//
+// Problems outside component:
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main_lib1.dart: Error: 'Never' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main_lib1.dart: Error: 'dynamic' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+//
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main.dart:11:7: Error: 'Never' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+// new exported.Never();
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main.dart:14:7: Error: 'dynamic' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+// new exported.dynamic();
+// ^^^^^^^^
+//
+import self as self;
+import "main_lib2.dart" as mai;
+import "main_lib3.dart" as mai2;
+
+import "org-dartlang-testcase:///main_lib1.dart" as exported;
+import "org-dartlang-testcase:///main_lib2.dart" as lib2;
+import "org-dartlang-testcase:///main_lib3.dart" as lib3;
+import "org-dartlang-testcase:///main_lib4.dart" as lib4;
+
+static method test() → dynamic {
+ invalid-expression "pkg/front_end/testcases/general/export_builtin_from_dill/main.dart:11:7: Error: 'Never' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+ new exported.Never();
+ ^^^^^^^^";
+ invalid-type n1;
+ <invalid-type>[];
+ invalid-expression "pkg/front_end/testcases/general/export_builtin_from_dill/main.dart:14:7: Error: 'dynamic' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+ new exported.dynamic();
+ ^^^^^^^^";
+ invalid-type d1;
+ <invalid-type>[];
+ new mai::Never::•();
+ mai::Never n2;
+ <mai::Never>[];
+ new mai::dynamic::•();
+ mai::dynamic d2;
+ <mai::dynamic>[];
+ new mai2::Never::•();
+ mai2::Never n3;
+ <mai2::Never>[];
+ new mai2::dynamic::•();
+ mai2::dynamic d3;
+ <mai2::dynamic>[];
+ new mai::Never::•();
+ mai::Never n4;
+ <mai::Never>[];
+ new mai::dynamic::•();
+ mai::dynamic d4;
+ <mai::dynamic>[];
+}
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main_lib1.dart:6:1: Error: 'Never' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+// export 'main_lib3.dart';
+// ^
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main_lib1.dart:6:1: Error: 'dynamic' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+// export 'main_lib3.dart';
+// ^
+//
+import self as self2;
+import "dart:core" as core;
+
+export "org-dartlang-testcase:///main_lib2.dart";
+export "org-dartlang-testcase:///main_lib3.dart";
+
+static const field dynamic _exports# = #C1 /*isLegacy*/;
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart:7:7: Error: Can't use 'dynamic' as a name here.
+// class dynamic {}
+// ^^^^^^^
+//
+import self as mai;
+import "dart:core" as core;
+
+class Never extends core::Object {
+ synthetic constructor •() → mai::Never
+ : super core::Object::•()
+ ;
+}
+class dynamic extends core::Object {
+ synthetic constructor •() → mai::dynamic
+ : super core::Object::•()
+ ;
+}
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart:7:7: Error: Can't use 'dynamic' as a name here.
+// class dynamic {}
+// ^^^^^^^
+//
+import self as mai2;
+import "dart:core" as core;
+
+class Never extends core::Object {
+ synthetic constructor •() → mai2::Never
+ : super core::Object::•()
+ ;
+}
+class dynamic extends core::Object {
+ synthetic constructor •() → mai2::dynamic
+ : super core::Object::•()
+ ;
+}
+
+library /*isNonNullableByDefault*/;
+import self as self3;
+import "main_lib2.dart" as mai;
+additionalExports = (mai::Never,
+ mai::dynamic)
+
+export "org-dartlang-testcase:///main_lib2.dart";
+
+
+constants {
+ #C1 = "{\"Never\":\"'Never' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.\",\"dynamic\":\"'dynamic' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.\"}"
+}
diff --git a/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart.weak.modular.expect b/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart.weak.modular.expect
new file mode 100644
index 0000000..7d469ff
--- /dev/null
+++ b/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart.weak.modular.expect
@@ -0,0 +1,58 @@
+//
+// Problems outside component:
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main_lib1.dart: Error: 'Never' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main_lib1.dart: Error: 'dynamic' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+//
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main.dart:11:7: Error: 'Never' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+// new exported.Never();
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main.dart:14:7: Error: 'dynamic' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+// new exported.dynamic();
+// ^^^^^^^^
+//
+import self as self;
+import "main_lib2.dart" as mai;
+import "main_lib3.dart" as mai2;
+
+import "org-dartlang-testcase:///main_lib1.dart" as exported;
+import "org-dartlang-testcase:///main_lib2.dart" as lib2;
+import "org-dartlang-testcase:///main_lib3.dart" as lib3;
+import "org-dartlang-testcase:///main_lib4.dart" as lib4;
+
+static method test() → dynamic {
+ invalid-expression "pkg/front_end/testcases/general/export_builtin_from_dill/main.dart:11:7: Error: 'Never' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+ new exported.Never();
+ ^^^^^^^^";
+ invalid-type n1;
+ <invalid-type>[];
+ invalid-expression "pkg/front_end/testcases/general/export_builtin_from_dill/main.dart:14:7: Error: 'dynamic' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+ new exported.dynamic();
+ ^^^^^^^^";
+ invalid-type d1;
+ <invalid-type>[];
+ new mai::Never::•();
+ mai::Never n2;
+ <mai::Never>[];
+ new mai::dynamic::•();
+ mai::dynamic d2;
+ <mai::dynamic>[];
+ new mai2::Never::•();
+ mai2::Never n3;
+ <mai2::Never>[];
+ new mai2::dynamic::•();
+ mai2::dynamic d3;
+ <mai2::dynamic>[];
+ new mai::Never::•();
+ mai::Never n4;
+ <mai::Never>[];
+ new mai::dynamic::•();
+ mai::dynamic d4;
+ <mai::dynamic>[];
+}
diff --git a/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart.weak.outline.expect b/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart.weak.outline.expect
new file mode 100644
index 0000000..7f905c8
--- /dev/null
+++ b/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart.weak.outline.expect
@@ -0,0 +1,90 @@
+//
+// Problems outside component:
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main_lib1.dart: Error: 'Never' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main_lib1.dart: Error: 'dynamic' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+//
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "org-dartlang-testcase:///main_lib1.dart" as exported;
+import "org-dartlang-testcase:///main_lib2.dart" as lib2;
+import "org-dartlang-testcase:///main_lib3.dart" as lib3;
+import "org-dartlang-testcase:///main_lib4.dart" as lib4;
+
+static method test() → dynamic
+ ;
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main_lib1.dart:6:1: Error: 'Never' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+// export 'main_lib3.dart';
+// ^
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main_lib1.dart:6:1: Error: 'dynamic' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+// export 'main_lib3.dart';
+// ^
+//
+import self as self2;
+import "dart:core" as core;
+
+export "org-dartlang-testcase:///main_lib2.dart";
+export "org-dartlang-testcase:///main_lib3.dart";
+
+static const field dynamic _exports# = #C1 /*isLegacy*/;
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart:7:7: Error: Can't use 'dynamic' as a name here.
+// class dynamic {}
+// ^^^^^^^
+//
+import self as self3;
+import "dart:core" as core;
+
+class Never extends core::Object {
+ synthetic constructor •() → self3::Never
+ ;
+}
+class dynamic extends core::Object {
+ synthetic constructor •() → self3::dynamic
+ ;
+}
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart:7:7: Error: Can't use 'dynamic' as a name here.
+// class dynamic {}
+// ^^^^^^^
+//
+import self as self4;
+import "dart:core" as core;
+
+class Never extends core::Object {
+ synthetic constructor •() → self4::Never
+ ;
+}
+class dynamic extends core::Object {
+ synthetic constructor •() → self4::dynamic
+ ;
+}
+
+library /*isNonNullableByDefault*/;
+import self as self5;
+import "main_lib2.dart" as self3;
+additionalExports = (self3::Never,
+ self3::dynamic)
+
+export "org-dartlang-testcase:///main_lib2.dart";
+
+
+constants {
+ #C1 = "{\"Never\":\"'Never' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.\",\"dynamic\":\"'dynamic' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.\"}"
+}
diff --git a/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart.weak.transformed.expect b/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart.weak.transformed.expect
new file mode 100644
index 0000000..9110ac3
--- /dev/null
+++ b/pkg/front_end/testcases/general/export_builtin_from_dill/main.dart.weak.transformed.expect
@@ -0,0 +1,129 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main.dart:11:7: Error: 'Never' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+// new exported.Never();
+// ^^^^^^^^
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main.dart:14:7: Error: 'dynamic' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+// new exported.dynamic();
+// ^^^^^^^^
+//
+import self as self;
+import "dart:core" as core;
+import "main_lib2.dart" as mai;
+import "main_lib3.dart" as mai2;
+
+import "org-dartlang-testcase:///main_lib1.dart" as exported;
+import "org-dartlang-testcase:///main_lib2.dart" as lib2;
+import "org-dartlang-testcase:///main_lib3.dart" as lib3;
+import "org-dartlang-testcase:///main_lib4.dart" as lib4;
+
+static method test() → dynamic {
+ invalid-expression "pkg/front_end/testcases/general/export_builtin_from_dill/main.dart:11:7: Error: 'Never' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+ new exported.Never();
+ ^^^^^^^^";
+ invalid-type n1;
+ core::_GrowableList::•<invalid-type>(0);
+ invalid-expression "pkg/front_end/testcases/general/export_builtin_from_dill/main.dart:14:7: Error: 'dynamic' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+ new exported.dynamic();
+ ^^^^^^^^";
+ invalid-type d1;
+ core::_GrowableList::•<invalid-type>(0);
+ new mai::Never::•();
+ mai::Never n2;
+ core::_GrowableList::•<mai::Never>(0);
+ new mai::dynamic::•();
+ mai::dynamic d2;
+ core::_GrowableList::•<mai::dynamic>(0);
+ new mai2::Never::•();
+ mai2::Never n3;
+ core::_GrowableList::•<mai2::Never>(0);
+ new mai2::dynamic::•();
+ mai2::dynamic d3;
+ core::_GrowableList::•<mai2::dynamic>(0);
+ new mai::Never::•();
+ mai::Never n4;
+ core::_GrowableList::•<mai::Never>(0);
+ new mai::dynamic::•();
+ mai::dynamic d4;
+ core::_GrowableList::•<mai::dynamic>(0);
+}
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main_lib1.dart:6:1: Error: 'Never' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+// export 'main_lib3.dart';
+// ^
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main_lib1.dart:6:1: Error: 'dynamic' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.
+// export 'main_lib3.dart';
+// ^
+//
+import self as self2;
+import "dart:core" as core;
+
+export "org-dartlang-testcase:///main_lib2.dart";
+export "org-dartlang-testcase:///main_lib3.dart";
+
+static const field dynamic _exports# = #C1 /*isLegacy*/;
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart:7:7: Error: Can't use 'dynamic' as a name here.
+// class dynamic {}
+// ^^^^^^^
+//
+import self as mai;
+import "dart:core" as core;
+
+class Never extends core::Object {
+ synthetic constructor •() → mai::Never
+ : super core::Object::•()
+ ;
+}
+class dynamic extends core::Object {
+ synthetic constructor •() → mai::dynamic
+ : super core::Object::•()
+ ;
+}
+
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart:7:7: Error: Can't use 'dynamic' as a name here.
+// class dynamic {}
+// ^^^^^^^
+//
+import self as mai2;
+import "dart:core" as core;
+
+class Never extends core::Object {
+ synthetic constructor •() → mai2::Never
+ : super core::Object::•()
+ ;
+}
+class dynamic extends core::Object {
+ synthetic constructor •() → mai2::dynamic
+ : super core::Object::•()
+ ;
+}
+
+library /*isNonNullableByDefault*/;
+import self as self3;
+import "main_lib2.dart" as mai;
+additionalExports = (mai::Never,
+ mai::dynamic)
+
+export "org-dartlang-testcase:///main_lib2.dart";
+
+
+constants {
+ #C1 = "{\"Never\":\"'Never' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.\",\"dynamic\":\"'dynamic' is exported from both 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart' and 'pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart'.\"}"
+}
diff --git a/pkg/front_end/testcases/general/export_builtin_from_dill/main_lib1.dart b/pkg/front_end/testcases/general/export_builtin_from_dill/main_lib1.dart
new file mode 100644
index 0000000..b6e0b4c
--- /dev/null
+++ b/pkg/front_end/testcases/general/export_builtin_from_dill/main_lib1.dart
@@ -0,0 +1,6 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE.md file.
+
+export 'main_lib2.dart';
+export 'main_lib3.dart';
diff --git a/pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart b/pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart
new file mode 100644
index 0000000..ec81b39
--- /dev/null
+++ b/pkg/front_end/testcases/general/export_builtin_from_dill/main_lib2.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE.md file.
+
+class Never {}
+
+class dynamic {}
diff --git a/pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart b/pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart
new file mode 100644
index 0000000..ec81b39
--- /dev/null
+++ b/pkg/front_end/testcases/general/export_builtin_from_dill/main_lib3.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE.md file.
+
+class Never {}
+
+class dynamic {}
diff --git a/pkg/front_end/testcases/general/export_builtin_from_dill/main_lib4.dart b/pkg/front_end/testcases/general/export_builtin_from_dill/main_lib4.dart
new file mode 100644
index 0000000..2f1b537
--- /dev/null
+++ b/pkg/front_end/testcases/general/export_builtin_from_dill/main_lib4.dart
@@ -0,0 +1,5 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE.md file.
+
+export 'main_lib2.dart';
diff --git a/pkg/front_end/testcases/general/export_builtin_from_dill/test.options b/pkg/front_end/testcases/general/export_builtin_from_dill/test.options
new file mode 100644
index 0000000..874c688
--- /dev/null
+++ b/pkg/front_end/testcases/general/export_builtin_from_dill/test.options
@@ -0,0 +1,4 @@
+main_lib1.dart
+main_lib2.dart
+main_lib3.dart
+main_lib4.dart
\ No newline at end of file
diff --git a/pkg/front_end/testcases/incremental/export_core.yaml b/pkg/front_end/testcases/incremental/export_core.yaml
new file mode 100644
index 0000000..9e97e9e
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/export_core.yaml
@@ -0,0 +1,43 @@
+# Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+type: newworld
+worlds:
+ - entry: main.dart
+ sources:
+ main.dart: |
+ import 'lib.dart' as prefix;
+ main() {
+ prefix.method();
+ }
+ lib.dart: |
+ method() {
+ print("hello");
+ }
+ expectedLibraryCount: 2
+ - entry: main.dart
+ expectInitializeFromDill: false
+ worldType: updated
+ invalidate:
+ - lib.dart
+ sources:
+ lib.dart: |
+ export 'dart:core';
+ method() {
+ print("hello");
+ }
+ expectedLibraryCount: 2
+ - entry: main.dart
+ expectInitializeFromDill: false
+ worldType: updated
+ invalidate:
+ - main.dart
+ sources:
+ main.dart: |
+ import 'lib.dart' as prefix;
+ main() {
+ prefix.Never n;
+ prefix.method();
+ }
+ expectedLibraryCount: 2
diff --git a/pkg/front_end/testcases/incremental/export_core.yaml.world.1.expect b/pkg/front_end/testcases/incremental/export_core.yaml.world.1.expect
new file mode 100644
index 0000000..4900fec
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/export_core.yaml.world.1.expect
@@ -0,0 +1,15 @@
+main = main::main;
+library from "org-dartlang-test:///lib.dart" as lib {
+
+ static method method() → dynamic {
+ dart.core::print("hello");
+ }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+ import "org-dartlang-test:///lib.dart" as prefix;
+
+ static method main() → dynamic {
+ lib::method();
+ }
+}
diff --git a/pkg/front_end/testcases/incremental/export_core.yaml.world.2.expect b/pkg/front_end/testcases/incremental/export_core.yaml.world.2.expect
new file mode 100644
index 0000000..10e2231
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/export_core.yaml.world.2.expect
@@ -0,0 +1,97 @@
+main = main::main;
+library from "org-dartlang-test:///lib.dart" as lib {
+additionalExports = (asy::Future,
+ asy::FutureExtensions,
+ asy::Stream,
+ core::deprecated,
+ core::override,
+ core::provisional,
+ core::proxy,
+ core::identical,
+ core::identityHashCode,
+ core::print,
+ core::Comparator,
+ core::AbstractClassInstantiationError,
+ core::ArgumentError,
+ core::AssertionError,
+ core::BidirectionalIterator,
+ core::BigInt,
+ core::CastError,
+ core::Comparable,
+ core::ConcurrentModificationError,
+ core::CyclicInitializationError,
+ core::DateTime,
+ core::Deprecated,
+ core::Duration,
+ core::Enum,
+ core::EnumByName,
+ core::EnumName,
+ core::Error,
+ core::Exception,
+ core::Expando,
+ core::FallThroughError,
+ core::Finalizer,
+ core::FormatException,
+ core::Function,
+ core::IndexError,
+ core::IntegerDivisionByZeroException,
+ core::Invocation,
+ core::Iterable,
+ core::Iterator,
+ core::List,
+ core::Map,
+ core::MapEntry,
+ core::Match,
+ core::NoSuchMethodError,
+ core::Null,
+ core::NullThrownError,
+ core::Object,
+ core::OutOfMemoryError,
+ core::Pattern,
+ core::Provisional,
+ core::RangeError,
+ core::RegExp,
+ core::RegExpMatch,
+ core::RuneIterator,
+ core::Runes,
+ core::Set,
+ core::Sink,
+ core::StackOverflowError,
+ core::StackTrace,
+ core::StateError,
+ core::Stopwatch,
+ core::String,
+ core::StringBuffer,
+ core::StringSink,
+ core::Symbol,
+ core::Type,
+ core::TypeError,
+ core::UnimplementedError,
+ core::UnsupportedError,
+ core::Uri,
+ core::UriData,
+ core::WeakReference,
+ core::bool,
+ core::double,
+ core::int,
+ core::num,
+ core::pragma)
+
+ export "dart:core";
+
+ static const field dynamic _exports# = #C1 /*isLegacy*/;
+ static method method() → dynamic {
+ dart.core::print("hello");
+ }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+ import "org-dartlang-test:///lib.dart" as prefix;
+
+ static method main() → dynamic {
+ lib::method();
+ }
+}
+constants {
+ #C1 = "{\"dynamic\":\"<dynamic>\",\"Never\":\"<Never>\"}"
+}
diff --git a/pkg/front_end/testcases/incremental/export_core.yaml.world.3.expect b/pkg/front_end/testcases/incremental/export_core.yaml.world.3.expect
new file mode 100644
index 0000000..18b6808
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/export_core.yaml.world.3.expect
@@ -0,0 +1,98 @@
+main = main::main;
+library from "org-dartlang-test:///lib.dart" as lib {
+additionalExports = (asy::Future,
+ asy::FutureExtensions,
+ asy::Stream,
+ core::deprecated,
+ core::override,
+ core::provisional,
+ core::proxy,
+ core::identical,
+ core::identityHashCode,
+ core::print,
+ core::Comparator,
+ core::AbstractClassInstantiationError,
+ core::ArgumentError,
+ core::AssertionError,
+ core::BidirectionalIterator,
+ core::BigInt,
+ core::CastError,
+ core::Comparable,
+ core::ConcurrentModificationError,
+ core::CyclicInitializationError,
+ core::DateTime,
+ core::Deprecated,
+ core::Duration,
+ core::Enum,
+ core::EnumByName,
+ core::EnumName,
+ core::Error,
+ core::Exception,
+ core::Expando,
+ core::FallThroughError,
+ core::Finalizer,
+ core::FormatException,
+ core::Function,
+ core::IndexError,
+ core::IntegerDivisionByZeroException,
+ core::Invocation,
+ core::Iterable,
+ core::Iterator,
+ core::List,
+ core::Map,
+ core::MapEntry,
+ core::Match,
+ core::NoSuchMethodError,
+ core::Null,
+ core::NullThrownError,
+ core::Object,
+ core::OutOfMemoryError,
+ core::Pattern,
+ core::Provisional,
+ core::RangeError,
+ core::RegExp,
+ core::RegExpMatch,
+ core::RuneIterator,
+ core::Runes,
+ core::Set,
+ core::Sink,
+ core::StackOverflowError,
+ core::StackTrace,
+ core::StateError,
+ core::Stopwatch,
+ core::String,
+ core::StringBuffer,
+ core::StringSink,
+ core::Symbol,
+ core::Type,
+ core::TypeError,
+ core::UnimplementedError,
+ core::UnsupportedError,
+ core::Uri,
+ core::UriData,
+ core::WeakReference,
+ core::bool,
+ core::double,
+ core::int,
+ core::num,
+ core::pragma)
+
+ export "dart:core";
+
+ static const field dynamic _exports# = #C1 /*isLegacy*/;
+ static method method() → dynamic {
+ dart.core::print("hello");
+ }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+ import "org-dartlang-test:///lib.dart" as prefix;
+
+ static method main() → dynamic {
+ Never n;
+ lib::method();
+ }
+}
+constants {
+ #C1 = "{\"dynamic\":\"<dynamic>\",\"Never\":\"<Never>\"}"
+}
diff --git a/pkg/front_end/testcases/incremental/export_duplicate.yaml b/pkg/front_end/testcases/incremental/export_duplicate.yaml
new file mode 100644
index 0000000..c6eacb4
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/export_duplicate.yaml
@@ -0,0 +1,42 @@
+# Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+type: newworld
+worlds:
+ - entry: main.dart
+ sources:
+ main.dart: |
+ import 'lib1.dart' as prefix;
+ main() {}
+ lib1.dart: |
+ export 'lib2.dart';
+ export 'lib3.dart';
+ lib2.dart: |
+ class Duplicate {}
+ lib3.dart: |
+ // empty
+ expectedLibraryCount: 4
+ - entry: main.dart
+ expectInitializeFromDill: false
+ worldType: updated
+ invalidate:
+ - lib3.dart
+ sources:
+ lib3.dart: |
+ class Duplicate {}
+ expectedLibraryCount: 4
+ errors: true
+ - entry: main.dart
+ expectInitializeFromDill: false
+ worldType: updated
+ invalidate:
+ - main.dart
+ sources:
+ main.dart: |
+ import 'lib1.dart' as prefix;
+ main() {
+ prefix.Duplicate d;
+ }
+ expectedLibraryCount: 4
+ errors: true
diff --git a/pkg/front_end/testcases/incremental/export_duplicate.yaml.world.1.expect b/pkg/front_end/testcases/incremental/export_duplicate.yaml.world.1.expect
new file mode 100644
index 0000000..2c74038
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/export_duplicate.yaml.world.1.expect
@@ -0,0 +1,25 @@
+main = main::main;
+library from "org-dartlang-test:///lib1.dart" as lib1 {
+additionalExports = (lib2::Duplicate)
+
+ export "org-dartlang-test:///lib2.dart";
+ export "org-dartlang-test:///lib3.dart";
+
+}
+library from "org-dartlang-test:///lib2.dart" as lib2 {
+
+ class Duplicate extends dart.core::Object {
+ synthetic constructor •() → lib2::Duplicate
+ : super dart.core::Object::•()
+ ;
+ }
+}
+library from "org-dartlang-test:///lib3.dart" as lib3 {
+
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+ import "org-dartlang-test:///lib1.dart" as prefix;
+
+ static method main() → dynamic {}
+}
diff --git a/pkg/front_end/testcases/incremental/export_duplicate.yaml.world.2.expect b/pkg/front_end/testcases/incremental/export_duplicate.yaml.world.2.expect
new file mode 100644
index 0000000..90fe0bc
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/export_duplicate.yaml.world.2.expect
@@ -0,0 +1,40 @@
+main = main::main;
+library from "org-dartlang-test:///lib1.dart" as lib1 {
+//
+// Problems in library:
+//
+// org-dartlang-test:///lib1.dart:2:1: Error: 'Duplicate' is exported from both 'org-dartlang-test:///lib2.dart' and 'org-dartlang-test:///lib3.dart'.
+// export 'lib3.dart';
+// ^
+//
+
+ export "org-dartlang-test:///lib2.dart";
+ export "org-dartlang-test:///lib3.dart";
+
+ static const field dynamic _exports# = #C1 /*isLegacy*/;
+}
+library from "org-dartlang-test:///lib2.dart" as lib2 {
+
+ class Duplicate extends dart.core::Object {
+ synthetic constructor •() → lib2::Duplicate
+ : super dart.core::Object::•()
+ ;
+ }
+}
+library from "org-dartlang-test:///lib3.dart" as lib3 {
+
+ class Duplicate extends dart.core::Object {
+ synthetic constructor •() → lib3::Duplicate
+ : super dart.core::Object::•()
+ ;
+ }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+ import "org-dartlang-test:///lib1.dart" as prefix;
+
+ static method main() → dynamic {}
+}
+constants {
+ #C1 = "{\"Duplicate\":\"'Duplicate' is exported from both 'org-dartlang-test:///lib2.dart' and 'org-dartlang-test:///lib3.dart'.\"}"
+}
diff --git a/pkg/front_end/testcases/incremental/export_duplicate.yaml.world.3.expect b/pkg/front_end/testcases/incremental/export_duplicate.yaml.world.3.expect
new file mode 100644
index 0000000..2e7b4d8
--- /dev/null
+++ b/pkg/front_end/testcases/incremental/export_duplicate.yaml.world.3.expect
@@ -0,0 +1,42 @@
+main = main::main;
+library from "org-dartlang-test:///lib1.dart" as lib1 {
+//
+// Problems in library:
+//
+// org-dartlang-test:///lib1.dart:2:1: Error: 'Duplicate' is exported from both 'org-dartlang-test:///lib2.dart' and 'org-dartlang-test:///lib3.dart'.
+// export 'lib3.dart';
+// ^
+//
+
+ export "org-dartlang-test:///lib2.dart";
+ export "org-dartlang-test:///lib3.dart";
+
+ static const field dynamic _exports# = #C1 /*isLegacy*/;
+}
+library from "org-dartlang-test:///lib2.dart" as lib2 {
+
+ class Duplicate extends dart.core::Object {
+ synthetic constructor •() → lib2::Duplicate
+ : super dart.core::Object::•()
+ ;
+ }
+}
+library from "org-dartlang-test:///lib3.dart" as lib3 {
+
+ class Duplicate extends dart.core::Object {
+ synthetic constructor •() → lib3::Duplicate
+ : super dart.core::Object::•()
+ ;
+ }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+ import "org-dartlang-test:///lib1.dart" as prefix;
+
+ static method main() → dynamic {
+ invalid-type d;
+ }
+}
+constants {
+ #C1 = "{\"Duplicate\":\"'Duplicate' is exported from both 'org-dartlang-test:///lib2.dart' and 'org-dartlang-test:///lib3.dart'.\"}"
+}
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index fdeadcb..09ae599 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -16,6 +16,7 @@
dart2js/mixin_super/main: SemiFuzzFailure # https://github.com/dart-lang/sdk/issues/49339
dart2js/late_fields_with_annotation: SemiFuzzFailure # https://github.com/dart-lang/sdk/issues/49415
macros/augment_concrete: SemiFuzzFailure # https://github.com/dart-lang/sdk/issues/49414
+macros/extend_augmented: SemiFuzzFailure # Similar to https://github.com/dart-lang/sdk/issues/49414
const_functions/const_functions_list: SemiFuzzCrash
generic_metadata/typedef_generic_types_in_arguments_and_bounds: SemiFuzzCrash
diff --git a/pkg/front_end/testcases/weak.status b/pkg/front_end/testcases/weak.status
index f65a46a..b71c27e 100644
--- a/pkg/front_end/testcases/weak.status
+++ b/pkg/front_end/testcases/weak.status
@@ -13,6 +13,7 @@
dart2js/mixin_super/main: SemiFuzzFailure # https://github.com/dart-lang/sdk/issues/49339
dart2js/late_fields_with_annotation: SemiFuzzFailure # https://github.com/dart-lang/sdk/issues/49415
macros/augment_concrete: SemiFuzzFailure # https://github.com/dart-lang/sdk/issues/49414
+macros/extend_augmented: SemiFuzzFailure # Similar to https://github.com/dart-lang/sdk/issues/49414
dart2js/tear_off_patch/main: semiFuzzFailureOnForceRebuildBodies # needs custom libraries.json (and platform?) not setup here
general/constants/with_unevaluated_agnostic/various_2: SemiFuzzFailure # Looks similar to https://dart-review.googlesource.com/c/sdk/+/242441
diff --git a/pkg/test_runner/lib/src/compiler_configuration.dart b/pkg/test_runner/lib/src/compiler_configuration.dart
index d59e07e..ac15486 100644
--- a/pkg/test_runner/lib/src/compiler_configuration.dart
+++ b/pkg/test_runner/lib/src/compiler_configuration.dart
@@ -1194,7 +1194,7 @@
if (_useSdk) {
prefix = '${_configuration.buildDirectory}/dart-sdk/bin';
}
- return '$prefix/dart$shellScriptExtension';
+ return '$prefix/dart$executableExtension';
}
String computeAnalyzerCliPath() {
diff --git a/tools/VERSION b/tools/VERSION
index 1ea2e37..4681384 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 18
PATCH 0
-PRERELEASE 275
+PRERELEASE 276
PRERELEASE_PATCH 0
\ No newline at end of file