Version 2.18.0-211.0.dev
Merge commit '2cac7943cd69516a220c5cc4ab3f407e5f596412' into 'dev'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e23e516..b8bee49 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -167,7 +167,7 @@
- fix `unawaited_futures` to handle string interpolated
futures.
- update `use_colored_box` to not flag nullable colors,
-- add new lint:
+- add new lint:
`unnecessary_null_aware_operator_on_extension_on_nullable`.
- fix `no_leading_underscores_for_local_identifiers`
to lint local function declarations.
@@ -192,6 +192,16 @@
* `dart pub outdated` now shows which of your dependencies are discontinued.
* `dart pub publish` will now list all the files it is about to publish.
+## 2.17.4 - 2022-06-20
+
+This is a patch release that fixes:
+
+- Improve analysis of enums and switch (issue [#49188]).
+- Fix compiler crash when initializing Finalizable objects (issue [#49075]).
+
+[#49188]: https://github.com/dart-lang/sdk/issues/49188
+[#49075]: https://github.com/dart-lang/sdk/issues/49075
+
## 2.17.3 - 2022-06-01
This is a patch release that fixes:
diff --git a/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart b/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
index 6700fe9..22b4862 100644
--- a/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/named_type_builder.dart
@@ -110,7 +110,7 @@
final InstanceTypeVariableAccessState _instanceTypeVariableAccess;
- final bool _forTypeLiteral;
+ final bool _performTypeCanonicalization;
final bool hasExplicitTypeArguments;
@@ -119,7 +119,7 @@
Uri? fileUri,
int? charOffset,
required InstanceTypeVariableAccessState instanceTypeVariableAccess,
- bool forTypeLiteral: false}) {
+ bool performTypeCanonicalization: false}) {
bool isExplicit = true;
if (arguments != null) {
for (TypeBuilder argument in arguments) {
@@ -134,13 +134,13 @@
fileUri: fileUri,
charOffset: charOffset,
instanceTypeVariableAccess: instanceTypeVariableAccess,
- forTypeLiteral: forTypeLiteral)
+ performTypeCanonicalization: performTypeCanonicalization)
: new _InferredNamedTypeBuilder(name, nullabilityBuilder,
arguments: arguments,
fileUri: fileUri,
charOffset: charOffset,
instanceTypeVariableAccess: instanceTypeVariableAccess,
- forTypeLiteral: forTypeLiteral);
+ performTypeCanonicalization: performTypeCanonicalization);
}
NamedTypeBuilder._(
@@ -150,11 +150,11 @@
this.fileUri,
this.charOffset,
required InstanceTypeVariableAccessState instanceTypeVariableAccess,
- bool forTypeLiteral: false,
+ bool performTypeCanonicalization: false,
TypeDeclarationBuilder? declaration})
: assert(name is String || name is QualifiedName),
this._instanceTypeVariableAccess = instanceTypeVariableAccess,
- this._forTypeLiteral = forTypeLiteral,
+ this._performTypeCanonicalization = performTypeCanonicalization,
this.hasExplicitTypeArguments = arguments != null,
this._declaration = declaration;
@@ -401,7 +401,7 @@
DartType aliasedType = _buildAliasedInternal(library, typeUse, hierarchy);
return unalias(aliasedType,
legacyEraseAliases:
- !_forTypeLiteral && !library.isNonNullableByDefault);
+ !_performTypeCanonicalization && !library.isNonNullableByDefault);
}
@override
@@ -631,7 +631,7 @@
Uri? fileUri,
int? charOffset,
required InstanceTypeVariableAccessState instanceTypeVariableAccess,
- bool forTypeLiteral: false})
+ bool performTypeCanonicalization: false})
: super._(
name: name,
nullabilityBuilder: nullabilityBuilder,
@@ -639,7 +639,7 @@
fileUri: fileUri,
charOffset: charOffset,
instanceTypeVariableAccess: instanceTypeVariableAccess,
- forTypeLiteral: forTypeLiteral);
+ performTypeCanonicalization: performTypeCanonicalization);
_ExplicitNamedTypeBuilder.forDartType(DartType type,
TypeDeclarationBuilder declaration, NullabilityBuilder nullabilityBuilder,
@@ -654,7 +654,7 @@
InstanceTypeVariableAccessState.Unexpected,
fileUri: null,
charOffset: null,
- forTypeLiteral: false);
+ performTypeCanonicalization: false);
_ExplicitNamedTypeBuilder.fromTypeDeclarationBuilder(
TypeDeclarationBuilder declaration, NullabilityBuilder nullabilityBuilder,
@@ -671,7 +671,7 @@
arguments: arguments,
fileUri: fileUri,
charOffset: charOffset,
- forTypeLiteral: false,
+ performTypeCanonicalization: false,
instanceTypeVariableAccess: instanceTypeVariableAccess);
_ExplicitNamedTypeBuilder.forInvalidType(String name,
@@ -687,7 +687,7 @@
charOffset: message.charOffset,
instanceTypeVariableAccess:
InstanceTypeVariableAccessState.Unexpected,
- forTypeLiteral: false);
+ performTypeCanonicalization: false);
@override
bool get isExplicit => true;
@@ -710,7 +710,7 @@
Uri? fileUri,
int? charOffset,
required InstanceTypeVariableAccessState instanceTypeVariableAccess,
- bool forTypeLiteral: false})
+ bool performTypeCanonicalization: false})
: super._(
name: name,
nullabilityBuilder: nullabilityBuilder,
@@ -718,7 +718,7 @@
fileUri: fileUri,
charOffset: charOffset,
instanceTypeVariableAccess: instanceTypeVariableAccess,
- forTypeLiteral: forTypeLiteral);
+ performTypeCanonicalization: performTypeCanonicalization);
@override
bool get isExplicit => false;
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 6bfba8e..951fe0e 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -4211,7 +4211,7 @@
result = name.buildTypeWithResolvedArguments(
libraryBuilder.nullableBuilderIfTrue(isMarkedAsNullable), arguments,
allowPotentiallyConstantType: allowPotentiallyConstantType,
- forTypeCanonicalization: constantContext != ConstantContext.none);
+ performTypeCanonicalization: constantContext != ConstantContext.none);
// ignore: unnecessary_null_comparison
if (result == null) {
unhandled("null", "result", beginToken.charOffset, uri);
diff --git a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
index 33ca2e8..0c6c50e 100644
--- a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
@@ -256,7 +256,7 @@
TypeBuilder buildTypeWithResolvedArguments(
NullabilityBuilder nullabilityBuilder, List<TypeBuilder>? arguments,
{required bool allowPotentiallyConstantType,
- required bool forTypeCanonicalization}) {
+ required bool performTypeCanonicalization}) {
Message message = templateNotAType.withArguments(token.lexeme);
_helper.libraryBuilder
.addProblem(message, fileOffset, lengthForToken(token), _uri);
@@ -2931,13 +2931,13 @@
TypeBuilder buildTypeWithResolvedArguments(
NullabilityBuilder nullabilityBuilder, List<TypeBuilder>? arguments,
{required bool allowPotentiallyConstantType,
- required bool forTypeCanonicalization}) {
+ required bool performTypeCanonicalization}) {
String name = "${prefixGenerator._plainNameForRead}."
"${suffixGenerator._plainNameForRead}";
TypeBuilder type = suffixGenerator.buildTypeWithResolvedArguments(
nullabilityBuilder, arguments,
allowPotentiallyConstantType: allowPotentiallyConstantType,
- forTypeCanonicalization: forTypeCanonicalization);
+ performTypeCanonicalization: performTypeCanonicalization);
LocatedMessage message;
if (type is NamedTypeBuilder &&
type.declaration is InvalidTypeDeclarationBuilder) {
@@ -3058,7 +3058,7 @@
TypeBuilder buildTypeWithResolvedArguments(
NullabilityBuilder nullabilityBuilder, List<TypeBuilder>? arguments,
{required bool allowPotentiallyConstantType,
- required bool forTypeCanonicalization}) {
+ required bool performTypeCanonicalization}) {
if (declaration is OmittedTypeDeclarationBuilder) {
// TODO(johnniwinther): Report errors when this occurs in-body or with
// type arguments.
@@ -3071,7 +3071,7 @@
fileUri: _uri,
charOffset: fileOffset,
instanceTypeVariableAccess: _helper.instanceTypeVariableAccessState,
- forTypeLiteral: forTypeCanonicalization)
+ performTypeCanonicalization: performTypeCanonicalization)
..bind(_helper.libraryBuilder, declaration);
}
@@ -3119,7 +3119,7 @@
buildTypeWithResolvedArguments(
_helper.libraryBuilder.nonNullableBuilder, typeArguments,
allowPotentiallyConstantType: true,
- forTypeCanonicalization: true),
+ performTypeCanonicalization: true),
TypeUse.typeLiteral,
allowPotentiallyConstantType:
_helper.libraryFeatures.constructorTearoffs.isEnabled));
@@ -4195,7 +4195,7 @@
TypeBuilder buildTypeWithResolvedArguments(
NullabilityBuilder nullabilityBuilder, List<TypeBuilder>? arguments,
{required bool allowPotentiallyConstantType,
- required bool forTypeCanonicalization}) {
+ required bool performTypeCanonicalization}) {
Template<Message Function(String, String)> template = isUnresolved
? templateUnresolvedPrefixInTypeAnnotation
: templateNotAPrefixInTypeAnnotation;
@@ -4315,7 +4315,7 @@
TypeBuilder buildTypeWithResolvedArguments(
NullabilityBuilder nullabilityBuilder, List<TypeBuilder>? arguments,
{required bool allowPotentiallyConstantType,
- required bool forTypeCanonicalization}) {
+ required bool performTypeCanonicalization}) {
_helper.libraryBuilder.addProblem(message, fileOffset, noLength, _uri);
return new NamedTypeBuilder.forInvalidType(token.lexeme, nullabilityBuilder,
message.withLocation(_uri, fileOffset, noLength));
diff --git a/tools/VERSION b/tools/VERSION
index db6faae..5447454 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 18
PATCH 0
-PRERELEASE 210
+PRERELEASE 211
PRERELEASE_PATCH 0
\ No newline at end of file