Version 2.13.0-79.0.dev
Merge commit '741336e40b87b07d23e34c7607a30654b86dd001' into 'dev'
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index af89d14..47f4628 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -13378,6 +13378,11 @@
final List<NamedType> emptyListOfNamedType =
List.filled(0, dummyNamedType, growable: false);
+/// Almost const <TypeParameter>[], but not const in an attempt to avoid
+/// polymorphism. See https://dart-review.googlesource.com/c/sdk/+/185828.
+final List<TypeParameter> emptyListOfTypeParameter =
+ List.filled(0, dummyTypeParameter, growable: false);
+
/// Non-nullable [DartType] dummy value.
///
/// This is used as the removal sentinel in [RemovingTransformer] and can be
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index 4f9b333..911ea5a 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -2944,7 +2944,14 @@
List<TypeParameter> readAndPushTypeParameterList(
[List<TypeParameter> list, TreeNode parent]) {
int length = readUInt30();
- if (length == 0) return list ?? <TypeParameter>[];
+ if (length == 0) {
+ if (list != null) return list;
+ if (useGrowableLists) {
+ return <TypeParameter>[];
+ } else {
+ return emptyListOfTypeParameter;
+ }
+ }
if (list == null) {
list = new List<TypeParameter>.generate(
length, (_) => new TypeParameter(null, null)..parent = parent,
diff --git a/tests/language/constants_2018/constant_type_literal_test.dart b/tests/language/constants_2018/constant_type_literal_test.dart
index 924bcab..99a26db 100644
--- a/tests/language/constants_2018/constant_type_literal_test.dart
+++ b/tests/language/constants_2018/constant_type_literal_test.dart
@@ -8,7 +8,7 @@
import "dart:core" as core;
// No reloading support for deferred loading.
// See https://github.com/dart-lang/sdk/issues/33118.
-import "dart:core" deferred as dcore show int //# 01: compile-time error
+import "dart:core" deferred as dcore show int; //# 01: compile-time error
// Declares F function type alias, M mixin and C class.
import "constant_type_literal_types.dart";
diff --git a/tools/VERSION b/tools/VERSION
index 8ef5f55..2f4288c 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 13
PATCH 0
-PRERELEASE 78
+PRERELEASE 79
PRERELEASE_PATCH 0
\ No newline at end of file