diff --git a/pkg/vm/lib/metadata/inferred_type.dart b/pkg/vm/lib/metadata/inferred_type.dart index 9d7d382f956..c502553ef7e 100644 --- a/pkg/vm/lib/metadata/inferred_type.dart +++ b/pkg/vm/lib/metadata/inferred_type.dart @@ -110,7 +110,7 @@ class InferredType { } if (_constantValue != null) { buf.write( - ' (value: ${_constantValue!.toText(astTextStrategyForTesting)})'); + ' (value: ${_constantValue.toText(astTextStrategyForTesting)})'); } if (receiverNotInt) { buf.write(' (receiver not int)'); diff --git a/pkg/vm/lib/transformations/type_flow/types.dart b/pkg/vm/lib/transformations/type_flow/types.dart index 77e90fdfbc3..23557266f20 100644 --- a/pkg/vm/lib/transformations/type_flow/types.dart +++ b/pkg/vm/lib/transformations/type_flow/types.dart @@ -1452,12 +1452,10 @@ class RuntimeType extends Type { super._() { if (_type is InterfaceType && numImmediateTypeArgs > 0) { assert(typeArgs!.length >= numImmediateTypeArgs); - assert((_type as InterfaceType) - .typeArguments - .every((t) => t == const DynamicType())); + assert(_type.typeArguments.every((t) => t == const DynamicType())); } else if (_type is FutureOrType) { assert(typeArgs!.length >= numImmediateTypeArgs); - DartType typeArgument = (_type as FutureOrType).typeArgument; + DartType typeArgument = _type.typeArgument; assert(typeArgument == const DynamicType()); } else { assert(typeArgs == null); @@ -1537,7 +1535,7 @@ class RuntimeType extends Type { @override String toString() { final head = _type is InterfaceType - ? "${nodeToText((_type as InterfaceType).classNode)}" + ? "${nodeToText(_type.classNode)}" : "${nodeToText(_type)}"; final typeArgsStrs = (numImmediateTypeArgs == 0) ? "" @@ -1604,7 +1602,7 @@ class RuntimeType extends Type { if (rhs is FutureOrType) { if (_type is InterfaceType) { - Class thisClass = (_type as InterfaceType).classNode; + Class thisClass = _type.classNode; if (thisClass == typeHierarchy.coreTypes.futureClass) { return typeArgs![0].isSubtypeOfRuntimeType( typeHierarchy, runtimeType.typeArgs![0], SubtypeTestKind.Subtype); diff --git a/pkg/vm/lib/transformations/vm_constant_evaluator.dart b/pkg/vm/lib/transformations/vm_constant_evaluator.dart index 67d6b1c6b7e..ffe8dd0a506 100644 --- a/pkg/vm/lib/transformations/vm_constant_evaluator.dart +++ b/pkg/vm/lib/transformations/vm_constant_evaluator.dart @@ -57,9 +57,9 @@ class VMConstantEvaluator extends ConstantEvaluator { // Only add Platform fields if the Platform class is part of the component // being evaluated. if (_targetOS != null && _platformClass != null) { - _constantFields['operatingSystem'] = StringConstant(_targetOS!.name); + _constantFields['operatingSystem'] = StringConstant(_targetOS.name); _constantFields['pathSeparator'] = - StringConstant(_targetOS!.pathSeparator); + StringConstant(_targetOS.pathSeparator); } } diff --git a/pkg/vm/pubspec.yaml b/pkg/vm/pubspec.yaml index 12a0f276e23..df235286b57 100644 --- a/pkg/vm/pubspec.yaml +++ b/pkg/vm/pubspec.yaml @@ -4,7 +4,7 @@ description: VM specific Dart code and helper scripts publish_to: none environment: - sdk: '>=3.0.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' # Use 'any' constraints here; we get our versions from the DEPS file. dependencies: