Skip to content

Commit 4e21ee9

Browse files
stereotype441Commit Queue
authored andcommitted
[_fe_analyzer_shared] Update SDK constraint to ^3.9.0 and reformat files.
Change-Id: I6a6a69642c8c0417d3d8f2680daf68c48694bf03 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/446989 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Paul Berry <[email protected]>
1 parent 0707019 commit 4e21ee9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2128
-2296
lines changed

pkg/_fe_analyzer_shared/lib/src/exhaustiveness/exhaustive.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,8 @@ class _Checker {
324324

325325
// Sorting isn't necessary, but makes the behavior deterministic.
326326
List<Key> sortedPropertyKeys = propertyKeys.toList()..sort();
327-
List<Key> sortedAdditionalPropertyKeys =
328-
additionalPropertyKeys.toList()..sort();
327+
List<Key> sortedAdditionalPropertyKeys = additionalPropertyKeys.toList()
328+
..sort();
329329

330330
// Remove the first column from the value list and replace it with any
331331
// expanded fields.

pkg/_fe_analyzer_shared/lib/src/exhaustiveness/shared.dart

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -323,16 +323,15 @@ class ExhaustivenessCache<
323323
String textualRepresentation,
324324
) {
325325
Type nonNullable = typeOperations.getNonNullable(type);
326-
StaticType staticType =
327-
_uniqueTypeMap[uniqueValue] ??=
328-
new GeneralValueStaticType<Type, Identity>(
329-
typeOperations,
330-
this,
331-
nonNullable,
332-
new IdentityRestriction<Identity>(uniqueValue),
333-
textualRepresentation,
334-
uniqueValue,
335-
);
326+
StaticType staticType = _uniqueTypeMap[uniqueValue] ??=
327+
new GeneralValueStaticType<Type, Identity>(
328+
typeOperations,
329+
this,
330+
nonNullable,
331+
new IdentityRestriction<Identity>(uniqueValue),
332+
textualRepresentation,
333+
uniqueValue,
334+
);
336335
if (typeOperations.isNullable(type)) {
337336
staticType = staticType.nullable;
338337
}
@@ -657,8 +656,9 @@ mixin SpaceCreator<Pattern extends Object, Type extends Object> {
657656
if (space.singleSpaces.length == 1) {
658657
// Optimize for simple spaces to avoid unnecessary expansion of subtypes.
659658
SingleSpace singleSpace = space.singleSpaces.single;
660-
bool isUnrestricted =
661-
unrestrictedCache[singleSpace] ??= _isUnrestricted(singleSpace);
659+
bool isUnrestricted = unrestrictedCache[singleSpace] ??= _isUnrestricted(
660+
singleSpace,
661+
);
662662
if (isUnrestricted && type.isSubtypeOf(singleSpace.type)) {
663663
return true;
664664
}
@@ -677,8 +677,8 @@ mixin SpaceCreator<Pattern extends Object, Type extends Object> {
677677
for (StaticType subtype in subtypes) {
678678
bool found = false;
679679
for (SingleSpace singleSpace in space.singleSpaces) {
680-
bool isUnrestricted =
681-
unrestrictedCache[singleSpace] ??= _isUnrestricted(singleSpace);
680+
bool isUnrestricted = unrestrictedCache[singleSpace] ??=
681+
_isUnrestricted(singleSpace);
682682
if (isUnrestricted && subtype.isSubtypeOf(singleSpace.type)) {
683683
found = true;
684684
break;

pkg/_fe_analyzer_shared/lib/src/exhaustiveness/static_type.dart

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -496,18 +496,15 @@ class WrappedStaticType extends _BaseStaticType {
496496
@override
497497
late final StaticType nonNullable =
498498
wrappedType.nonNullable == wrappedType &&
499-
impliedType.nonNullable == impliedType
500-
? this
501-
: new WrappedStaticType(
502-
wrappedType.nonNullable,
503-
impliedType.nonNullable,
504-
);
499+
impliedType.nonNullable == impliedType
500+
? this
501+
: new WrappedStaticType(wrappedType.nonNullable, impliedType.nonNullable);
505502

506503
@override
507504
late final StaticType nullable =
508505
wrappedType.nullable == wrappedType && impliedType.nullable == impliedType
509-
? this
510-
: new WrappedStaticType(wrappedType.nullable, impliedType.nullable);
506+
? this
507+
: new WrappedStaticType(wrappedType.nullable, impliedType.nullable);
511508

512509
@override
513510
void typeToDart(DartTemplateBuffer buffer) {

0 commit comments

Comments
 (0)