Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit add1eac

Browse files
author
Dart CI
committed
Version 2.13.0-31.0.dev
Merge commit 'af0c951d9f2a4212594faf67317d3ddb00fc2dd8' into 'dev'
2 parents 1e0fec6 + af0c951 commit add1eac

34 files changed

+503
-560
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ Updated the Linter to `0.1.129`, which includes:
245245
* The `--server` option to `dart pub publish` and `dart pub uploader` have been
246246
deprecated. Use `publish_to` in your `pubspec.yaml` or set the
247247
`$PUB_HOSTED_URL` environment variable.
248-
* `pub global activate no longer re-precompiles if current global installed was
248+
* `pub global activate` no longer re-precompiles if current global installed was
249249
same version.
250250
* The Flutter SDK constraint upper bound is now ignored in pubspecs and
251251
deprecated when publishing.

pkg/front_end/test/spell_checking_list_code.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,7 @@ method8b
709709
method9a
710710
method9b
711711
mi
712+
migrated
712713
migration
713714
mime
714715
min

pkg/kernel/lib/ast.dart

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9371,7 +9371,7 @@ class NamedType extends Node implements Comparable<NamedType> {
93719371
final DartType type;
93729372
final bool isRequired;
93739373

9374-
NamedType(this.name, this.type, {this.isRequired: false});
9374+
const NamedType(this.name, this.type, {this.isRequired: false});
93759375

93769376
@override
93779377
bool operator ==(Object other) => equals(other, null);
@@ -11550,3 +11550,12 @@ class Version extends Object {
1155011550
return "Version(major=$major, minor=$minor)";
1155111551
}
1155211552
}
11553+
11554+
/// Non-nullable `DartType` value to be used as a dummy initial value for the
11555+
/// `List.filled` constructor.
11556+
const DartType dartTypeDummy = const DynamicType();
11557+
11558+
/// Non-nullable `NamedType` value to be used as a dummy initial value for the
11559+
/// `List.filled` constructor.
11560+
const NamedType namedTypeDummy =
11561+
const NamedType('', dartTypeDummy, isRequired: false);

pkg/kernel/lib/class_hierarchy.dart

Lines changed: 140 additions & 153 deletions
Large diffs are not rendered by default.

pkg/kernel/lib/core_types.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ library kernel.core_types;
77
// ignore: import_of_legacy_library_into_null_safe
88
import 'ast.dart';
99
import 'library_index.dart';
10-
// ignore: import_of_legacy_library_into_null_safe
1110
import 'type_algebra.dart';
1211

1312
/// Provides access to the classes and libraries in the core libraries.

pkg/kernel/lib/src/hierarchy_based_type_environment.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
// @dart = 2.9
6-
75
library kernel.hierarchy_based_type_environment;
86

7+
// ignore: import_of_legacy_library_into_null_safe
98
import '../ast.dart' show Class, DartType, InterfaceType, Library, Member, Name;
109

1110
import '../class_hierarchy.dart' show ClassHierarchyBase;
@@ -21,20 +20,20 @@ class HierarchyBasedTypeEnvironment extends TypeEnvironment {
2120
: super.fromSubclass(coreTypes, hierarchy);
2221

2322
@override
24-
InterfaceType getTypeAsInstanceOf(InterfaceType type, Class superclass,
23+
InterfaceType? getTypeAsInstanceOf(InterfaceType type, Class superclass,
2524
Library clientLibrary, CoreTypes coreTypes) {
2625
return hierarchy.getTypeAsInstanceOf(type, superclass, clientLibrary);
2726
}
2827

2928
@override
30-
List<DartType> getTypeArgumentsAsInstanceOf(
29+
List<DartType>? getTypeArgumentsAsInstanceOf(
3130
InterfaceType type, Class superclass) {
3231
if (type.classNode == superclass) return type.typeArguments;
3332
return hierarchy.getTypeArgumentsAsInstanceOf(type, superclass);
3433
}
3534

3635
@override
37-
Member getInterfaceMember(Class cls, Name name, {bool setter: false}) {
36+
Member? getInterfaceMember(Class cls, Name name, {bool setter: false}) {
3837
return hierarchy.getInterfaceMember(cls, name, setter: setter);
3938
}
4039
}

pkg/kernel/lib/src/legacy_erasure.dart

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE.md file.
44

5-
// @dart = 2.9
6-
5+
// ignore: import_of_legacy_library_into_null_safe
76
import '../ast.dart' hide MapEntry;
87

98
import 'replacement_visitor.dart';
@@ -20,7 +19,7 @@ DartType legacyErasure(DartType type) {
2019
/// named parameters are not required.
2120
///
2221
/// Returns `null` if the type wasn't changed.
23-
DartType rawLegacyErasure(DartType type) {
22+
DartType? rawLegacyErasure(DartType type) {
2423
return type.accept1(const _LegacyErasure(), Variance.covariant);
2524
}
2625

@@ -31,10 +30,10 @@ Supertype legacyErasureSupertype(Supertype supertype) {
3130
if (supertype.typeArguments.isEmpty) {
3231
return supertype;
3332
}
34-
List<DartType> newTypeArguments;
33+
List<DartType>? newTypeArguments;
3534
for (int i = 0; i < supertype.typeArguments.length; i++) {
3635
DartType typeArgument = supertype.typeArguments[i];
37-
DartType newTypeArgument =
36+
DartType? newTypeArgument =
3837
typeArgument.accept1(const _LegacyErasure(), Variance.covariant);
3938
if (newTypeArgument != null) {
4039
newTypeArguments ??= supertype.typeArguments.toList(growable: false);
@@ -54,15 +53,15 @@ Supertype legacyErasureSupertype(Supertype supertype) {
5453
class _LegacyErasure extends ReplacementVisitor {
5554
const _LegacyErasure();
5655

57-
Nullability visitNullability(DartType node) {
56+
Nullability? visitNullability(DartType node) {
5857
if (node.declaredNullability != Nullability.legacy) {
5958
return Nullability.legacy;
6059
}
6160
return null;
6261
}
6362

6463
@override
65-
NamedType createNamedType(NamedType node, DartType newType) {
64+
NamedType? createNamedType(NamedType node, DartType? newType) {
6665
if (node.isRequired || newType != null) {
6766
return new NamedType(node.name, newType ?? node.type, isRequired: false);
6867
}
@@ -101,7 +100,7 @@ class _LegacyErasure extends ReplacementVisitor {
101100
/// }
102101
///
103102
bool needsLegacyErasure(Class enclosingClass, Class declaringClass) {
104-
Class cls = enclosingClass;
103+
Class? cls = enclosingClass;
105104
while (cls != null) {
106105
if (!cls.enclosingLibrary.isNonNullableByDefault) {
107106
return true;

0 commit comments

Comments
 (0)