From 0a93b04d66f43669c5343e5e356a6daca23b6650 Mon Sep 17 00:00:00 2001 From: Konstantin Shcheglov Date: Wed, 8 Feb 2023 17:52:20 +0000 Subject: [PATCH] Issue 51137. Don't use the type inferred from the initializer to resolve the initializer. Bug: https://github.com/dart-lang/sdk/issues/51137 Change-Id: I5979e2531b285d86141d60cd844919456ff17c47 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281462 Reviewed-by: Brian Wilkerson Reviewed-by: Samuel Rawlins Commit-Queue: Konstantin Shcheglov --- .../lib/src/dart/analysis/driver.dart | 2 +- .../lib/src/dart/element/element.dart | 34 +- .../src/dart/element/generic_inferrer.dart | 136 ++- .../lib/src/dart/element/type_system.dart | 19 +- .../dart/error/inference_error_listener.dart | 164 ---- .../resolver/extension_member_resolver.dart | 7 +- .../dart/resolver/invocation_inferrer.dart | 1 - .../variable_declaration_resolver.dart | 7 +- pkg/analyzer/lib/src/generated/resolver.dart | 44 +- .../lib/src/summary2/ast_resolver.dart | 13 - .../lib/src/summary2/element_flags.dart | 20 +- .../lib/src/summary2/top_level_inference.dart | 11 - .../lib/src/task/inference_error.dart | 2 - .../resolution/top_level_variable_test.dart | 133 ++- .../src/diagnostics/could_not_infer_test.dart | 4 +- ...e_failure_on_function_invocation_test.dart | 9 - ...ce_failure_on_generic_invocation_test.dart | 10 - ...nce_failure_on_instance_creation_test.dart | 2 +- .../test/src/summary/element_text.dart | 14 +- .../test/src/summary/elements_test.dart | 926 +++++++++++++++++- pkg/analyzer/test/src/summary/macro_test.dart | 2 + .../src/summary/top_level_inference_test.dart | 222 +++++ pkg/nnbd_migration/lib/src/fix_builder.dart | 1 - 23 files changed, 1449 insertions(+), 334 deletions(-) delete mode 100644 pkg/analyzer/lib/src/dart/error/inference_error_listener.dart diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart index 222ad7e9ac5a..4e8894e5d5fb 100644 --- a/pkg/analyzer/lib/src/dart/analysis/driver.dart +++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart @@ -87,7 +87,7 @@ import 'package:analyzer/src/utilities/uri_cache.dart'; /// TODO(scheglov) Clean up the list of implicitly analyzed files. class AnalysisDriver implements AnalysisDriverGeneric { /// The version of data format, should be incremented on every format change. - static const int DATA_VERSION = 257; + static const int DATA_VERSION = 258; /// The number of exception contexts allowed to write. Once this field is /// zero, we stop writing any new exception contexts in this process. diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart index 3f3f3d9bca6b..085f6aed30c1 100644 --- a/pkg/analyzer/lib/src/dart/element/element.dart +++ b/pkg/analyzer/lib/src/dart/element/element.dart @@ -4952,27 +4952,33 @@ class Modifier implements Comparable { static const Modifier PROMOTABLE = Modifier('IS_PROMOTABLE', 23); + /// Indicates whether the type of a [PropertyInducingElementImpl] should be + /// used to infer the initializer. We set it to `false` if the type was + /// inferred from the initializer itself. + static const Modifier SHOULD_USE_TYPE_FOR_INITIALIZER_INFERENCE = + Modifier('SHOULD_USE_TYPE_FOR_INITIALIZER_INFERENCE', 24); + /// Indicates that the modifier 'sealed' was applied to the element. - static const Modifier SEALED = Modifier('SEALED', 24); + static const Modifier SEALED = Modifier('SEALED', 25); /// Indicates that the pseudo-modifier 'set' was applied to the element. - static const Modifier SETTER = Modifier('SETTER', 25); + static const Modifier SETTER = Modifier('SETTER', 26); /// See [TypeParameterizedElement.isSimplyBounded]. - static const Modifier SIMPLY_BOUNDED = Modifier('SIMPLY_BOUNDED', 26); + static const Modifier SIMPLY_BOUNDED = Modifier('SIMPLY_BOUNDED', 27); /// Indicates that the modifier 'static' was applied to the element. - static const Modifier STATIC = Modifier('STATIC', 27); + static const Modifier STATIC = Modifier('STATIC', 28); /// Indicates that the element does not appear in the source code but was /// implicitly created. For example, if a class does not define any /// constructors, an implicit zero-argument constructor will be created and it /// will be marked as being synthetic. - static const Modifier SYNTHETIC = Modifier('SYNTHETIC', 28); + static const Modifier SYNTHETIC = Modifier('SYNTHETIC', 29); /// Indicates that the element was appended to this enclosing element to /// simulate temporary the effect of applying augmentation. - static const Modifier TEMP_AUGMENTATION = Modifier('TEMP_AUGMENTATION', 29); + static const Modifier TEMP_AUGMENTATION = Modifier('TEMP_AUGMENTATION', 30); static const List values = [ ABSTRACT, @@ -5935,7 +5941,9 @@ abstract class PropertyInducingElementImpl /// Initialize a newly created synthetic element to have the given [name] and /// [offset]. - PropertyInducingElementImpl(super.name, super.offset); + PropertyInducingElementImpl(super.name, super.offset) { + setModifier(Modifier.SHOULD_USE_TYPE_FOR_INITIALIZER_INFERENCE, true); + } @override bool get isConstantEvaluated => true; @@ -5960,6 +5968,14 @@ abstract class PropertyInducingElementImpl } } + bool get shouldUseTypeForInitializerInference { + return hasModifier(Modifier.SHOULD_USE_TYPE_FOR_INITIALIZER_INFERENCE); + } + + set shouldUseTypeForInitializerInference(bool value) { + setModifier(Modifier.SHOULD_USE_TYPE_FOR_INITIALIZER_INFERENCE, value); + } + @override DartType get type => ElementTypeProvider.current.getFieldType(this); @@ -5999,7 +6015,9 @@ abstract class PropertyInducingElementImpl } // We must be linking, and the type has not been set yet. - return _type = typeInference!.perform(); + _type = typeInference!.perform(); + shouldUseTypeForInitializerInference = false; + return _type!; } /// Return `true` if this variable needs the setter. diff --git a/pkg/analyzer/lib/src/dart/element/generic_inferrer.dart b/pkg/analyzer/lib/src/dart/element/generic_inferrer.dart index d6f4962cfc17..753d7b3a3491 100644 --- a/pkg/analyzer/lib/src/dart/element/generic_inferrer.dart +++ b/pkg/analyzer/lib/src/dart/element/generic_inferrer.dart @@ -4,9 +4,18 @@ import 'dart:math' as math; -import 'package:analyzer/dart/ast/ast.dart' show AstNode; +import 'package:analyzer/dart/ast/ast.dart' + show + Annotation, + AsExpression, + AstNode, + ConstructorName, + Expression, + InvocationExpression, + SimpleIdentifier; import 'package:analyzer/dart/element/element.dart'; import 'package:analyzer/dart/element/type.dart'; +import 'package:analyzer/error/listener.dart' show ErrorReporter; import 'package:analyzer/src/dart/element/element.dart'; import 'package:analyzer/src/dart/element/nullability_eliminator.dart'; import 'package:analyzer/src/dart/element/type.dart'; @@ -15,7 +24,8 @@ import 'package:analyzer/src/dart/element/type_constraint_gatherer.dart'; import 'package:analyzer/src/dart/element/type_provider.dart'; import 'package:analyzer/src/dart/element/type_schema.dart'; import 'package:analyzer/src/dart/element/type_system.dart'; -import 'package:analyzer/src/dart/error/inference_error_listener.dart'; +import 'package:analyzer/src/error/codes.dart' + show CompileTimeErrorCode, HintCode; import 'package:meta/meta.dart'; /// Tracks upper and lower type bounds for a set of type parameters. @@ -49,13 +59,12 @@ class GenericInferrer { /// The list of type parameters being inferred. final List _typeFormals; - /// The [InferenceErrorListener] to which inference errors should be reported, - /// or `null` if errors shouldn't be reported. - final InferenceErrorListener? _inferenceErrorListener; + /// The [ErrorReporter] to which inference errors should be reported, or + /// `null` if errors shouldn't be reported. + final ErrorReporter? errorReporter; /// The [AstNode] to which errors should be attached. May be `null` if errors - /// are not being reported (that is, if [_inferenceErrorListener] is also - /// `null`). + /// are not being reported (that is, if [errorReporter] is also `null`). final AstNode? errorNode; /// Indicates whether the "generic metadata" feature is enabled. When it is, @@ -87,10 +96,12 @@ class GenericInferrer { final Map _typesInferredSoFar = {}; GenericInferrer(this._typeSystem, this._typeFormals, - {InferenceErrorListener? inferenceErrorListener, + {this.errorReporter, this.errorNode, - required this.genericMetadataIsEnabled}) - : _inferenceErrorListener = inferenceErrorListener { + required this.genericMetadataIsEnabled}) { + if (errorReporter != null) { + assert(errorNode != null); + } _typeParameters.addAll(_typeFormals); for (var formal in _typeFormals) { _constraints[formal] = []; @@ -208,7 +219,9 @@ class GenericInferrer { if (!success) { if (failAtError) return null; hasErrorReported = true; - _inferenceErrorListener?.addCouldNotInferError(errorNode!, + errorReporter?.reportErrorForNode( + CompileTimeErrorCode.COULD_NOT_INFER, + errorNode!, [parameter.name, _formatError(parameter, inferred, constraints)]); // Heuristic: even if we failed, keep the erroneous type. @@ -220,12 +233,13 @@ class GenericInferrer { if (inferred is FunctionType && inferred.typeFormals.isNotEmpty && !genericMetadataIsEnabled && - _inferenceErrorListener != null) { + errorReporter != null) { if (failAtError) return null; hasErrorReported = true; var typeFormals = inferred.typeFormals; var typeFormalsStr = typeFormals.map(_elementStr).join(', '); - _inferenceErrorListener?.addCouldNotInferError(errorNode!, [ + errorReporter!.reportErrorForNode( + CompileTimeErrorCode.COULD_NOT_INFER, errorNode!, [ parameter.name, ' Inferred candidate type ${_typeStr(inferred)} has type parameters' ' [$typeFormalsStr], but a function with' @@ -235,13 +249,16 @@ class GenericInferrer { if (UnknownInferredType.isKnown(inferred)) { knownTypes[parameter] = inferred; - } else if (!hasErrorReported && _typeSystem.strictInference) { + } else if (_typeSystem.strictInference) { // [typeParam] could not be inferred. A result will still be returned // by [infer], with [typeParam] filled in as its bounds. This is // considered a failure of inference, under the "strict-inference" // mode. - hasErrorReported = true; - _inferenceErrorListener?.reportInferenceFailure(errorNode!); + _reportInferenceFailure( + errorReporter: errorReporter, + errorNode: errorNode, + genericMetadataIsEnabled: genericMetadataIsEnabled, + ); } } @@ -259,7 +276,8 @@ class GenericInferrer { var typeParamBound = Substitution.fromPairs(_typeFormals, inferredTypes) .substituteType(typeParam.bound ?? typeProvider.objectType); // TODO(jmesserly): improve this error message. - _inferenceErrorListener?.addCouldNotInferError(errorNode!, [ + errorReporter?.reportErrorForNode( + CompileTimeErrorCode.COULD_NOT_INFER, errorNode!, [ typeParam.name, "\nRecursive bound cannot be instantiated: '$typeParamBound'." "\nConsider passing explicit type argument(s) " @@ -270,6 +288,8 @@ class GenericInferrer { if (!hasErrorReported) { _checkArgumentsNotMatchingBounds( + errorNode: errorNode, + errorReporter: errorReporter, typeArguments: result, ); } @@ -284,6 +304,8 @@ class GenericInferrer { /// Check that inferred [typeArguments] satisfy the [typeParameters] bounds. void _checkArgumentsNotMatchingBounds({ + required AstNode? errorNode, + required ErrorReporter? errorReporter, required List typeArguments, }) { for (int i = 0; i < _typeFormals.length; i++) { @@ -299,7 +321,8 @@ class GenericInferrer { var substitution = Substitution.fromPairs(_typeFormals, typeArguments); var bound = substitution.substituteType(rawBound); if (!_typeSystem.isSubtypeOf(argument, bound)) { - _inferenceErrorListener?.addCouldNotInferError( + errorReporter?.reportErrorForNode( + CompileTimeErrorCode.COULD_NOT_INFER, errorNode!, [ parameter.name, @@ -524,6 +547,83 @@ class GenericInferrer { } } + /// Reports an inference failure on [errorNode] according to its type. + void _reportInferenceFailure({ + ErrorReporter? errorReporter, + AstNode? errorNode, + required bool genericMetadataIsEnabled, + }) { + if (errorReporter == null || errorNode == null) { + return; + } + if (errorNode.parent is InvocationExpression && + errorNode.parent?.parent is AsExpression) { + // Casts via `as` do not play a part in downward inference. We allow an + // exception when inference has "failed" but the return value is + // immediately cast with `as`. + return; + } + if (errorNode is ConstructorName && + !(errorNode.type.type as InterfaceType).element.hasOptionalTypeArgs) { + String constructorName = errorNode.name == null + ? errorNode.type.name.name + : '${errorNode.type}.${errorNode.name}'; + errorReporter.reportErrorForNode( + HintCode.INFERENCE_FAILURE_ON_INSTANCE_CREATION, + errorNode, + [constructorName]); + } else if (errorNode is Annotation) { + if (genericMetadataIsEnabled) { + // Only report an error if generic metadata is valid syntax. + var element = errorNode.name.staticElement; + if (element != null && !element.hasOptionalTypeArgs) { + String constructorName = errorNode.constructorName == null + ? errorNode.name.name + : '${errorNode.name.name}.${errorNode.constructorName}'; + errorReporter.reportErrorForNode( + HintCode.INFERENCE_FAILURE_ON_INSTANCE_CREATION, + errorNode, + [constructorName]); + } + } + } else if (errorNode is SimpleIdentifier) { + var element = errorNode.staticElement; + if (element != null) { + if (element is VariableElement) { + // For variable elements, we check their type and possible alias type. + var type = element.type; + final typeElement = type is InterfaceType ? type.element : null; + if (typeElement != null && typeElement.hasOptionalTypeArgs) { + return; + } + var typeAliasElement = type.alias?.element; + if (typeAliasElement != null && + typeAliasElement.hasOptionalTypeArgs) { + return; + } + } + if (!element.hasOptionalTypeArgs) { + errorReporter.reportErrorForNode( + HintCode.INFERENCE_FAILURE_ON_FUNCTION_INVOCATION, + errorNode, + [errorNode.name]); + return; + } + } + } else if (errorNode is Expression) { + var type = errorNode.staticType; + if (type != null) { + var typeDisplayString = type.getDisplayString( + withNullability: _typeSystem.isNonNullableByDefault); + errorReporter.reportErrorForNode( + HintCode.INFERENCE_FAILURE_ON_GENERIC_INVOCATION, + errorNode, + [typeDisplayString]); + return; + } + } + } + /// If in a legacy library, return the legacy version of the [type]. /// Otherwise, return the original type. DartType _toLegacyElementIfOptOut(DartType type) { diff --git a/pkg/analyzer/lib/src/dart/element/type_system.dart b/pkg/analyzer/lib/src/dart/element/type_system.dart index 69af67cdd245..0fd788e38897 100644 --- a/pkg/analyzer/lib/src/dart/element/type_system.dart +++ b/pkg/analyzer/lib/src/dart/element/type_system.dart @@ -31,7 +31,6 @@ import 'package:analyzer/src/dart/element/type_provider.dart'; import 'package:analyzer/src/dart/element/type_schema.dart'; import 'package:analyzer/src/dart/element/type_schema_elimination.dart'; import 'package:analyzer/src/dart/element/well_bounded.dart'; -import 'package:analyzer/src/dart/error/inference_error_listener.dart'; import 'package:analyzer/src/utilities/extensions/collection.dart'; /// Fresh type parameters created to unify two lists of type parameters. @@ -495,13 +494,7 @@ class TypeSystemImpl implements TypeSystem { // subtypes (or supertypes) as necessary, and track the constraints that // are implied by this. var inferrer = GenericInferrer(this, fnType.typeFormals, - inferenceErrorListener: errorReporter == null - ? null - : InferenceErrorReporter( - errorReporter, - isNonNullableByDefault: isNonNullableByDefault, - isGenericMetadataEnabled: genericMetadataIsEnabled, - ), + errorReporter: errorReporter, errorNode: errorNode, genericMetadataIsEnabled: genericMetadataIsEnabled); inferrer.constrainGenericFunctionInContext(fnType, contextType); @@ -1540,7 +1533,6 @@ class TypeSystemImpl implements TypeSystem { required DartType declaredReturnType, required DartType? contextReturnType, ErrorReporter? errorReporter, - InferenceErrorListener? inferenceErrorListener, AstNode? errorNode, required bool genericMetadataIsEnabled, bool isConst = false}) { @@ -1548,15 +1540,8 @@ class TypeSystemImpl implements TypeSystem { // inferred. It will optimistically assume these type parameters can be // subtypes (or supertypes) as necessary, and track the constraints that // are implied by this. - if (errorReporter != null) { - inferenceErrorListener ??= InferenceErrorReporter( - errorReporter, - isNonNullableByDefault: isNonNullableByDefault, - isGenericMetadataEnabled: genericMetadataIsEnabled, - ); - } var inferrer = GenericInferrer(this, typeParameters, - inferenceErrorListener: inferenceErrorListener, + errorReporter: errorReporter, errorNode: errorNode, genericMetadataIsEnabled: genericMetadataIsEnabled); diff --git a/pkg/analyzer/lib/src/dart/error/inference_error_listener.dart b/pkg/analyzer/lib/src/dart/error/inference_error_listener.dart deleted file mode 100644 index 3a1d0fa7ffd5..000000000000 --- a/pkg/analyzer/lib/src/dart/error/inference_error_listener.dart +++ /dev/null @@ -1,164 +0,0 @@ -import 'package:analyzer/dart/ast/ast.dart'; -import 'package:analyzer/dart/element/element.dart'; -import 'package:analyzer/dart/element/type.dart'; -import 'package:analyzer/error/listener.dart'; -import 'package:analyzer/src/dart/error/hint_codes.g.dart'; -import 'package:analyzer/src/error/codes.g.dart'; -import 'package:analyzer/src/task/inference_error.dart'; - -/// A listener which can receive various inference errors. -/// -/// This is separate from [ErrorReporter] for the case of discovering inference -/// errors during AST resolution, which happens far before type analysis and -/// most static error reporting. -abstract class InferenceErrorListener { - final bool _isNonNullableByDefault; - final bool _isGenericMetadataEnabled; - - InferenceErrorListener({ - required bool isNonNullableByDefault, - required bool isGenericMetadataEnabled, - }) : _isNonNullableByDefault = isNonNullableByDefault, - _isGenericMetadataEnabled = isGenericMetadataEnabled; - - void addCouldNotInferError(AstNode node, List arguments); - - void addInferenceFailureOnFunctionInvocationError( - AstNode node, List arguments); - - void addInferenceFailureOnGenericInvocationError( - AstNode node, List arguments); - - void addInferenceFailureOnInstanceCreationError( - AstNode node, List arguments); - - /// Reports an inference failure on [errorNode] according to its type. - void reportInferenceFailure(AstNode errorNode) { - if (errorNode.parent is InvocationExpression && - errorNode.parent?.parent is AsExpression) { - // Casts via `as` do not play a part in downward inference. We allow an - // exception when inference has "failed" but the return value is - // immediately cast with `as`. - return; - } - if (errorNode is ConstructorName && - !(errorNode.type.type as InterfaceType).element.hasOptionalTypeArgs) { - String constructorName = errorNode.name == null - ? errorNode.type.name.name - : '${errorNode.type}.${errorNode.name}'; - addInferenceFailureOnInstanceCreationError(errorNode, [constructorName]); - } else if (errorNode is Annotation) { - if (_isGenericMetadataEnabled) { - // Only report an error if generic metadata is valid syntax. - var element = errorNode.name.staticElement; - if (element != null && !element.hasOptionalTypeArgs) { - String constructorName = errorNode.constructorName == null - ? errorNode.name.name - : '${errorNode.name.name}.${errorNode.constructorName}'; - addInferenceFailureOnInstanceCreationError( - errorNode, [constructorName]); - } - } - } else if (errorNode is SimpleIdentifier) { - var element = errorNode.staticElement; - if (element == null) { - return; - } - if (element is VariableElement) { - // For variable elements, we check their type and possible alias type. - var type = element.type; - final typeElement = type is InterfaceType ? type.element : null; - if (typeElement != null && typeElement.hasOptionalTypeArgs) { - return; - } - var typeAliasElement = type.alias?.element; - if (typeAliasElement != null && typeAliasElement.hasOptionalTypeArgs) { - return; - } - } - if (!element.hasOptionalTypeArgs) { - addInferenceFailureOnFunctionInvocationError( - errorNode, [errorNode.name]); - } - } else if (errorNode is Expression) { - var type = errorNode.staticType; - if (type != null) { - var typeDisplayString = - type.getDisplayString(withNullability: _isNonNullableByDefault); - addInferenceFailureOnGenericInvocationError( - errorNode, [typeDisplayString]); - } - } - } -} - -class InferenceErrorRecorder extends InferenceErrorListener { - final Set errors = {}; - - InferenceErrorRecorder({ - required super.isNonNullableByDefault, - required super.isGenericMetadataEnabled, - }); - - @override - void addCouldNotInferError(AstNode node, List arguments) { - errors.add(TopLevelInferenceError( - kind: TopLevelInferenceErrorKind.couldNotInfer, - arguments: arguments, - )); - } - - @override - void addInferenceFailureOnFunctionInvocationError( - AstNode node, List arguments) { - // This error is re-discovered and reported during type analysis. - } - - @override - void addInferenceFailureOnGenericInvocationError( - AstNode node, List arguments) { - // This error is re-discovered and reported during type analysis. - } - - @override - void addInferenceFailureOnInstanceCreationError( - AstNode node, List arguments) { - errors.add(TopLevelInferenceError( - kind: TopLevelInferenceErrorKind.inferenceFailureOnInstanceCreation, - arguments: arguments, - )); - } -} - -class InferenceErrorReporter extends InferenceErrorListener { - final ErrorReporter _errorReporter; - - InferenceErrorReporter( - this._errorReporter, { - required super.isNonNullableByDefault, - required super.isGenericMetadataEnabled, - }); - - @override - void addCouldNotInferError(AstNode node, List arguments) => - _errorReporter.reportErrorForNode( - CompileTimeErrorCode.COULD_NOT_INFER, node, arguments); - - @override - void addInferenceFailureOnFunctionInvocationError( - AstNode node, List arguments) => - _errorReporter.reportErrorForNode( - HintCode.INFERENCE_FAILURE_ON_FUNCTION_INVOCATION, node, arguments); - - @override - void addInferenceFailureOnGenericInvocationError( - AstNode node, List arguments) => - _errorReporter.reportErrorForNode( - HintCode.INFERENCE_FAILURE_ON_GENERIC_INVOCATION, node, arguments); - - @override - void addInferenceFailureOnInstanceCreationError( - AstNode node, List arguments) => - _errorReporter.reportErrorForNode( - HintCode.INFERENCE_FAILURE_ON_INSTANCE_CREATION, node, arguments); -} diff --git a/pkg/analyzer/lib/src/dart/resolver/extension_member_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/extension_member_resolver.dart index 3465293dfce9..0e5d1409fa22 100644 --- a/pkg/analyzer/lib/src/dart/resolver/extension_member_resolver.dart +++ b/pkg/analyzer/lib/src/dart/resolver/extension_member_resolver.dart @@ -16,7 +16,6 @@ import 'package:analyzer/src/dart/element/member.dart'; import 'package:analyzer/src/dart/element/type_algebra.dart'; import 'package:analyzer/src/dart/element/type_schema.dart'; import 'package:analyzer/src/dart/element/type_system.dart'; -import 'package:analyzer/src/dart/error/inference_error_listener.dart'; import 'package:analyzer/src/dart/resolver/applicable_extensions.dart'; import 'package:analyzer/src/dart/resolver/resolution_result.dart'; import 'package:analyzer/src/error/codes.dart'; @@ -345,11 +344,7 @@ class ExtensionMemberResolver { } } else { var inferrer = GenericInferrer(_typeSystem, typeParameters, - inferenceErrorListener: InferenceErrorReporter( - _errorReporter, - isNonNullableByDefault: _isNonNullableByDefault, - isGenericMetadataEnabled: _genericMetadataIsEnabled, - ), + errorReporter: _errorReporter, errorNode: node.extensionName, genericMetadataIsEnabled: _genericMetadataIsEnabled); inferrer.constrainArgument( diff --git a/pkg/analyzer/lib/src/dart/resolver/invocation_inferrer.dart b/pkg/analyzer/lib/src/dart/resolver/invocation_inferrer.dart index f0faa0940c6b..a1dabaa6757b 100644 --- a/pkg/analyzer/lib/src/dart/resolver/invocation_inferrer.dart +++ b/pkg/analyzer/lib/src/dart/resolver/invocation_inferrer.dart @@ -195,7 +195,6 @@ abstract class FullInvocationInferrer contextReturnType: contextType, isConst: _isConst, errorReporter: resolver.errorReporter, - inferenceErrorListener: resolver.inferenceErrorListener, errorNode: _errorNode, genericMetadataIsEnabled: resolver.genericMetadataIsEnabled, ); diff --git a/pkg/analyzer/lib/src/dart/resolver/variable_declaration_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/variable_declaration_resolver.dart index c68e46504759..77ff0eb9b1a8 100644 --- a/pkg/analyzer/lib/src/dart/resolver/variable_declaration_resolver.dart +++ b/pkg/analyzer/lib/src/dart/resolver/variable_declaration_resolver.dart @@ -7,6 +7,7 @@ import 'package:analyzer/dart/element/element.dart'; import 'package:analyzer/src/dart/ast/ast.dart'; import 'package:analyzer/src/dart/ast/extensions.dart'; import 'package:analyzer/src/dart/element/element.dart'; +import 'package:analyzer/src/dart/element/type_schema.dart'; import 'package:analyzer/src/error/codes.dart'; import 'package:analyzer/src/generated/resolver.dart'; @@ -47,7 +48,11 @@ class VariableDeclarationResolver { _resolver.flowAnalysis.flow?.lateInitializer_begin(node); } - _resolver.analyzeExpression(initializer, element.type); + final contextType = element is! PropertyInducingElementImpl || + element.shouldUseTypeForInitializerInference + ? element.type + : UnknownInferredType.instance; + _resolver.analyzeExpression(initializer, contextType); initializer = _resolver.popRewrite()!; var whyNotPromoted = _resolver.flowAnalysis.flow?.whyNotPromoted(initializer); diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart index bab3d94fe978..eaef508a04a5 100644 --- a/pkg/analyzer/lib/src/generated/resolver.dart +++ b/pkg/analyzer/lib/src/generated/resolver.dart @@ -41,7 +41,6 @@ import 'package:analyzer/src/dart/element/type.dart'; import 'package:analyzer/src/dart/element/type_provider.dart'; import 'package:analyzer/src/dart/element/type_schema.dart'; import 'package:analyzer/src/dart/element/type_system.dart'; -import 'package:analyzer/src/dart/error/inference_error_listener.dart'; import 'package:analyzer/src/dart/resolver/annotation_resolver.dart'; import 'package:analyzer/src/dart/resolver/assignment_expression_resolver.dart'; import 'package:analyzer/src/dart/resolver/binary_expression_resolver.dart'; @@ -183,12 +182,6 @@ class ResolverVisitor extends ThrowingAstVisitor @override final ErrorReporter errorReporter; - /// The [InferenceErrorListener] to which inference errors should be reported, - /// or `null` if such errors shouldn't be reported. - /// - /// If `null`, errors will still be reported to [errorReporter]. - final InferenceErrorListener? inferenceErrorListener; - /// The class containing the AST nodes being visited, /// or `null` if we are not in the scope of a class. InterfaceElement? enclosingClass; @@ -336,8 +329,7 @@ class ResolverVisitor extends ThrowingAstVisitor TypeProvider typeProvider, AnalysisErrorListener errorListener, {FeatureSet? featureSet, - required FlowAnalysisHelper flowAnalysisHelper, - InferenceErrorListener? inferenceErrorListener}) + required FlowAnalysisHelper flowAnalysisHelper}) : this._( inheritanceManager, definingLibrary, @@ -345,7 +337,6 @@ class ResolverVisitor extends ThrowingAstVisitor definingLibrary.typeSystem, typeProvider as TypeProviderImpl, errorListener, - inferenceErrorListener, featureSet ?? definingLibrary.context.analysisOptions.contextFeatures, flowAnalysisHelper, @@ -359,7 +350,6 @@ class ResolverVisitor extends ThrowingAstVisitor this.typeSystem, this.typeProvider, AnalysisErrorListener errorListener, - this.inferenceErrorListener, FeatureSet featureSet, this.flowAnalysis, this._migratableAstInfoProvider, @@ -3558,27 +3548,10 @@ class ResolverVisitor extends ThrowingAstVisitor if (error == null) { return; } - switch (error.kind) { - case TopLevelInferenceErrorKind.none: - break; - case TopLevelInferenceErrorKind.couldNotInfer: - errorReporter.reportErrorForToken( - CompileTimeErrorCode.COULD_NOT_INFER, node.name, error.arguments); - break; - case TopLevelInferenceErrorKind.dependencyCycle: - var argumentsText = error.arguments.join(', '); - errorReporter.reportErrorForToken(CompileTimeErrorCode.TOP_LEVEL_CYCLE, - node.name, [node.name.lexeme, argumentsText]); - break; - case TopLevelInferenceErrorKind.inferenceFailureOnInstanceCreation: - errorReporter.reportErrorForToken( - HintCode.INFERENCE_FAILURE_ON_INSTANCE_CREATION, - node.name, - error.arguments); - break; - case TopLevelInferenceErrorKind.overrideNoCombinedSuperSignature: - // TODO: Handle this case. - break; + if (error.kind == TopLevelInferenceErrorKind.dependencyCycle) { + var argumentsText = error.arguments.join(', '); + errorReporter.reportErrorForToken(CompileTimeErrorCode.TOP_LEVEL_CYCLE, + node.name, [node.name.lexeme, argumentsText]); } } @@ -3610,11 +3583,6 @@ class ResolverVisitor extends ThrowingAstVisitor var inferrer = GenericInferrer( typeSystem, typeParameters, - inferenceErrorListener: InferenceErrorReporter( - errorReporter, - isNonNullableByDefault: typeSystem.isNonNullableByDefault, - isGenericMetadataEnabled: genericMetadataIsEnabled, - ), errorNode: errorNode, genericMetadataIsEnabled: genericMetadataIsEnabled, ); @@ -3974,7 +3942,6 @@ class ResolverVisitorForMigration extends ResolverVisitor { Source source, TypeProvider typeProvider, AnalysisErrorListener errorListener, - InferenceErrorListener? inferenceErrorListener, TypeSystemImpl typeSystem, FeatureSet featureSet, MigrationResolutionHooks migrationResolutionHooks) @@ -3986,7 +3953,6 @@ class ResolverVisitorForMigration extends ResolverVisitor { typeSystem, typeProvider as TypeProviderImpl, errorListener, - inferenceErrorListener, featureSet, FlowAnalysisHelperForMigration( typeSystem, migrationResolutionHooks, featureSet), diff --git a/pkg/analyzer/lib/src/summary2/ast_resolver.dart b/pkg/analyzer/lib/src/summary2/ast_resolver.dart index 05614c230356..baa81d419b53 100644 --- a/pkg/analyzer/lib/src/summary2/ast_resolver.dart +++ b/pkg/analyzer/lib/src/summary2/ast_resolver.dart @@ -10,12 +10,10 @@ import 'package:analyzer/dart/element/type.dart'; import 'package:analyzer/error/listener.dart'; import 'package:analyzer/src/dart/ast/ast.dart'; import 'package:analyzer/src/dart/element/element.dart'; -import 'package:analyzer/src/dart/error/inference_error_listener.dart'; import 'package:analyzer/src/dart/resolver/flow_analysis_visitor.dart'; import 'package:analyzer/src/dart/resolver/resolution_visitor.dart'; import 'package:analyzer/src/generated/resolver.dart'; import 'package:analyzer/src/summary2/link.dart'; -import 'package:analyzer/src/task/inference_error.dart'; /// Used to resolve some AST nodes - variable initializers, and annotations. class AstResolver { @@ -25,12 +23,6 @@ class AstResolver { final FeatureSet _featureSet; final AnalysisErrorListener _errorListener = AnalysisErrorListener.NULL_LISTENER; - late final _inferenceErrorRecorder = InferenceErrorRecorder( - isNonNullableByDefault: - _unitElement.library.typeSystem.isNonNullableByDefault, - isGenericMetadataEnabled: - _unitElement.library.featureSet.isEnabled(Feature.generic_metadata), - ); final InterfaceElement? enclosingClassElement; final ExecutableElement? enclosingExecutableElement; late final _resolutionVisitor = ResolutionVisitor( @@ -56,7 +48,6 @@ class AstResolver { _errorListener, featureSet: _featureSet, flowAnalysisHelper: _flowAnalysis, - inferenceErrorListener: _inferenceErrorRecorder, ); AstResolver( @@ -67,10 +58,6 @@ class AstResolver { this.enclosingExecutableElement, }) : _featureSet = _unitElement.library.featureSet; - /// All inference errors recorded by [_inferenceErrorRecorder]. - List get errors => - _inferenceErrorRecorder.errors.toList(growable: false); - void resolveAnnotation(AnnotationImpl node) { node.accept(_resolutionVisitor); node.accept(_scopeResolverVisitor); diff --git a/pkg/analyzer/lib/src/summary2/element_flags.dart b/pkg/analyzer/lib/src/summary2/element_flags.dart index 2d9fef9b724a..88026b8bb14c 100644 --- a/pkg/analyzer/lib/src/summary2/element_flags.dart +++ b/pkg/analyzer/lib/src/summary2/element_flags.dart @@ -99,9 +99,10 @@ class FieldElementFlags { static const int _isFinal = 1 << 8; static const int _isLate = 1 << 9; static const int _isPromotable = 1 << 10; - static const int _isStatic = 1 << 11; - static const int _isSynthetic = 1 << 12; - static const int _isTempAugmentation = 1 << 13; + static const int _shouldUseTypeForInitializerInference = 1 << 11; + static const int _isStatic = 1 << 12; + static const int _isSynthetic = 1 << 13; + static const int _isTempAugmentation = 1 << 14; static void read(SummaryDataReader reader, FieldElementImpl element) { var byte = reader.readUInt30(); @@ -116,6 +117,8 @@ class FieldElementFlags { element.isFinal = (byte & _isFinal) != 0; element.isLate = (byte & _isLate) != 0; element.isPromotable = (byte & _isPromotable) != 0; + element.shouldUseTypeForInitializerInference = + (byte & _shouldUseTypeForInitializerInference) != 0; element.isStatic = (byte & _isStatic) != 0; element.isSynthetic = (byte & _isSynthetic) != 0; element.isTempAugmentation = (byte & _isTempAugmentation) != 0; @@ -134,6 +137,9 @@ class FieldElementFlags { result |= element.isFinal ? _isFinal : 0; result |= element.isLate ? _isLate : 0; result |= element.isPromotable ? _isPromotable : 0; + result |= element.shouldUseTypeForInitializerInference + ? _shouldUseTypeForInitializerInference + : 0; result |= element.isStatic ? _isStatic : 0; result |= element.isSynthetic ? _isSynthetic : 0; result |= element.isTempAugmentation ? _isTempAugmentation : 0; @@ -339,7 +345,8 @@ class TopLevelVariableElementFlags { static const int _isExternal = 1 << 2; static const int _isFinal = 1 << 3; static const int _isLate = 1 << 4; - static const int _isTempAugmentation = 1 << 5; + static const int _shouldUseTypeForInitializerInference = 1 << 5; + static const int _isTempAugmentation = 1 << 6; static void read( SummaryDataReader reader, @@ -351,6 +358,8 @@ class TopLevelVariableElementFlags { element.isExternal = (byte & _isExternal) != 0; element.isFinal = (byte & _isFinal) != 0; element.isLate = (byte & _isLate) != 0; + element.shouldUseTypeForInitializerInference = + (byte & _shouldUseTypeForInitializerInference) != 0; element.isTempAugmentation = (byte & _isTempAugmentation) != 0; } @@ -361,6 +370,9 @@ class TopLevelVariableElementFlags { result |= element.isExternal ? _isExternal : 0; result |= element.isFinal ? _isFinal : 0; result |= element.isLate ? _isLate : 0; + result |= element.shouldUseTypeForInitializerInference + ? _shouldUseTypeForInitializerInference + : 0; result |= element.isTempAugmentation ? _isTempAugmentation : 0; sink.writeByte(result); } diff --git a/pkg/analyzer/lib/src/summary2/top_level_inference.dart b/pkg/analyzer/lib/src/summary2/top_level_inference.dart index 699bba361fa9..db1d0e33b503 100644 --- a/pkg/analyzer/lib/src/summary2/top_level_inference.dart +++ b/pkg/analyzer/lib/src/summary2/top_level_inference.dart @@ -79,11 +79,6 @@ class ConstantInitializersResolver { var astResolver = AstResolver(linker, _unitElement, _scope); astResolver.resolveExpression(() => variable.initializer!, contextType: element.type); - var errors = astResolver.errors; - if (errors.isNotEmpty) { - assert(errors.length == 1, 'Unexpected errors: $errors'); - element.typeInferenceError = errors.first; - } } if (element is ConstVariableElement) { @@ -267,12 +262,6 @@ class _PropertyInducingElementTypeInference _status = _InferenceStatus.inferred; } - var errors = astResolver.errors; - if (errors.isNotEmpty) { - assert(errors.length == 1, 'Unexpected errors: $errors'); - _element.typeInferenceError = errors.first; - } - var initializerType = _node.initializer!.typeOrThrow; return _refineType(initializerType); } diff --git a/pkg/analyzer/lib/src/task/inference_error.dart b/pkg/analyzer/lib/src/task/inference_error.dart index d4ebb3505fc2..9a7c57ed077b 100644 --- a/pkg/analyzer/lib/src/task/inference_error.dart +++ b/pkg/analyzer/lib/src/task/inference_error.dart @@ -19,8 +19,6 @@ class TopLevelInferenceError { /// Enum used to indicate the kind of the error during top-level inference. enum TopLevelInferenceErrorKind { none, - couldNotInfer, dependencyCycle, - inferenceFailureOnInstanceCreation, overrideNoCombinedSuperSignature, } diff --git a/pkg/analyzer/test/src/dart/resolution/top_level_variable_test.dart b/pkg/analyzer/test/src/dart/resolution/top_level_variable_test.dart index 1c97297a6af2..0116a1fcfac7 100644 --- a/pkg/analyzer/test/src/dart/resolution/top_level_variable_test.dart +++ b/pkg/analyzer/test/src/dart/resolution/top_level_variable_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'package:analyzer/src/dart/error/hint_codes.dart'; +import 'package:analyzer/src/error/codes.dart'; import 'package:test/test.dart'; import 'package:test_reflective_loader/test_reflective_loader.dart'; @@ -18,6 +18,137 @@ main() { @reflectiveTest class TopLevelVariableTest extends PubPackageResolutionTest with TopLevelVariableTestCases { + /// See https://github.com/dart-lang/sdk/issues/51137 + test_initializer_contextType_dontUseInferredType() async { + await assertErrorsInCode(''' +// @dart=2.17 +T? f(T Function() a, int Function(T) b) => null; +String g() => ''; +final x = f(g, (z) => z.length); +''', [ + error(CompileTimeErrorCode.UNCHECKED_PROPERTY_ACCESS_OF_NULLABLE_VALUE, + 108, 6), + ]); + final node = findNode.variableDeclaration('x ='); + assertResolvedNodeText(node, r''' +VariableDeclaration + name: x + equals: = + initializer: MethodInvocation + methodName: SimpleIdentifier + token: f + staticElement: self::@function::f + staticType: T? Function(T Function(), int Function(T)) + argumentList: ArgumentList + leftParenthesis: ( + arguments + SimpleIdentifier + token: g + parameter: ParameterMember + base: root::@parameter::a + substitution: {T: String} + staticElement: self::@function::g + staticType: String Function() + FunctionExpression + parameters: FormalParameterList + leftParenthesis: ( + parameter: SimpleFormalParameter + name: z + declaredElement: @99::@parameter::z + declaredElementType: Object? + rightParenthesis: ) + body: ExpressionFunctionBody + functionDefinition: => + expression: PrefixedIdentifier + prefix: SimpleIdentifier + token: z + staticElement: @99::@parameter::z + staticType: Object? + period: . + identifier: SimpleIdentifier + token: length + staticElement: + staticType: dynamic + staticElement: + staticType: dynamic + declaredElement: @99 + parameter: ParameterMember + base: root::@parameter::b + substitution: {T: String} + staticType: int Function(Object?) + rightParenthesis: ) + staticInvokeType: String? Function(String Function(), int Function(String)) + staticType: String? + typeArgumentTypes + String + declaredElement: self::@variable::x +'''); + } + + /// See https://github.com/dart-lang/sdk/issues/51137 + test_initializer_contextType_typeAnnotation() async { + await assertNoErrorsInCode(''' +// @dart=2.17 +T? f(T Function() a, int Function(T) b) => null; +String g() => ''; +final String? x = f(g, (z) => z.length); +'''); + final node = findNode.variableDeclaration('x ='); + assertResolvedNodeText(node, r''' +VariableDeclaration + name: x + equals: = + initializer: MethodInvocation + methodName: SimpleIdentifier + token: f + staticElement: self::@function::f + staticType: T? Function(T Function(), int Function(T)) + argumentList: ArgumentList + leftParenthesis: ( + arguments + SimpleIdentifier + token: g + parameter: ParameterMember + base: root::@parameter::a + substitution: {T: String} + staticElement: self::@function::g + staticType: String Function() + FunctionExpression + parameters: FormalParameterList + leftParenthesis: ( + parameter: SimpleFormalParameter + name: z + declaredElement: @107::@parameter::z + declaredElementType: String + rightParenthesis: ) + body: ExpressionFunctionBody + functionDefinition: => + expression: PrefixedIdentifier + prefix: SimpleIdentifier + token: z + staticElement: @107::@parameter::z + staticType: String + period: . + identifier: SimpleIdentifier + token: length + staticElement: dart:core::@class::String::@getter::length + staticType: int + staticElement: dart:core::@class::String::@getter::length + staticType: int + declaredElement: @107 + parameter: ParameterMember + base: root::@parameter::b + substitution: {T: String} + staticType: int Function(String) + rightParenthesis: ) + staticInvokeType: String? Function(String Function(), int Function(String)) + staticType: String? + typeArgumentTypes + String + declaredElement: self::@variable::x +'''); + } + test_type_inferred_nonNullify() async { newFile('$testPackageLibPath/a.dart', r''' // @dart = 2.7 diff --git a/pkg/analyzer/test/src/diagnostics/could_not_infer_test.dart b/pkg/analyzer/test/src/diagnostics/could_not_infer_test.dart index 13d3d572d290..36597defe6c4 100644 --- a/pkg/analyzer/test/src/diagnostics/could_not_infer_test.dart +++ b/pkg/analyzer/test/src/diagnostics/could_not_infer_test.dart @@ -93,7 +93,9 @@ class C

{ var c = C([]); ''', [ - error(CompileTimeErrorCode.COULD_NOT_INFER, 78, 1), + error(CompileTimeErrorCode.COULD_NOT_INFER, 82, 1), + error(CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, 82, 1, + contextMessages: [message('/home/test/lib/test.dart', 82, 1)]), ]); } } diff --git a/pkg/analyzer/test/src/diagnostics/inference_failure_on_function_invocation_test.dart b/pkg/analyzer/test/src/diagnostics/inference_failure_on_function_invocation_test.dart index f0da9005c861..3dcf6c8ae7a7 100644 --- a/pkg/analyzer/test/src/diagnostics/inference_failure_on_function_invocation_test.dart +++ b/pkg/analyzer/test/src/diagnostics/inference_failure_on_function_invocation_test.dart @@ -39,15 +39,6 @@ void f(void Function() m) { ]); } - test_functionType_noInference_topLevel() async { - await assertErrorsInCode(''' -int m() => 1; -var x = m(); -''', [ - error(HintCode.INFERENCE_FAILURE_ON_FUNCTION_INVOCATION, 25, 1), - ]); - } - test_functionType_notGeneric() async { await assertNoErrorsInCode(''' void f(void Function() m) { diff --git a/pkg/analyzer/test/src/diagnostics/inference_failure_on_generic_invocation_test.dart b/pkg/analyzer/test/src/diagnostics/inference_failure_on_generic_invocation_test.dart index 680f14860963..bc644c9c953a 100644 --- a/pkg/analyzer/test/src/diagnostics/inference_failure_on_generic_invocation_test.dart +++ b/pkg/analyzer/test/src/diagnostics/inference_failure_on_generic_invocation_test.dart @@ -54,16 +54,6 @@ void f(void Function()? m, void Function() n) { ]); } - test_genericFunctionExpression_noInference_topLevel() async { - await assertErrorsInCode(''' -int Function()? m = () => 1; -int Function() n = () => 2; -var x = (m ?? n)(); -''', [ - error(HintCode.INFERENCE_FAILURE_ON_GENERIC_INVOCATION, 77, 8), - ]); - } - test_genericFunctionExpression_upwardsInference() async { await assertNoErrorsInCode(''' void f(void Function(T a)? m, void Function(T a) n) { diff --git a/pkg/analyzer/test/src/diagnostics/inference_failure_on_instance_creation_test.dart b/pkg/analyzer/test/src/diagnostics/inference_failure_on_instance_creation_test.dart index 8fe5dc20a5e6..56eee8d2f174 100644 --- a/pkg/analyzer/test/src/diagnostics/inference_failure_on_instance_creation_test.dart +++ b/pkg/analyzer/test/src/diagnostics/inference_failure_on_instance_creation_test.dart @@ -180,7 +180,7 @@ void f() { import 'dart:collection'; var m = HashMap(); ''', [ - error(HintCode.INFERENCE_FAILURE_ON_INSTANCE_CREATION, 30, 1), + error(HintCode.INFERENCE_FAILURE_ON_INSTANCE_CREATION, 34, 7), ]); } diff --git a/pkg/analyzer/test/src/summary/element_text.dart b/pkg/analyzer/test/src/summary/element_text.dart index 64ae963c0d74..d836700100fc 100644 --- a/pkg/analyzer/test/src/summary/element_text.dart +++ b/pkg/analyzer/test/src/summary/element_text.dart @@ -74,7 +74,7 @@ void checkElementTextWithConfiguration( // Assuming traceString contains "$_testPath:$invocationLine:$column", // figure out the value of invocationLine. - int testFilePathOffset = traceString.indexOf(_testPath!); + int testFilePathOffset = traceString.lastIndexOf(_testPath!); expect(testFilePathOffset, isNonNegative); // Sanity check: there must be ':' after the path. @@ -931,12 +931,24 @@ class _ElementWriter { _writeCodeRange(e); _writeTypeInferenceError(e); _writeType('type', e.type); + _writeShouldUseTypeForInitializerInference(e); _writeConstantInitializer(e); _writeNonSyntheticElement(e); writeLinking(); }); } + void _writeShouldUseTypeForInitializerInference( + PropertyInducingElementImpl e, + ) { + if (!e.isSynthetic) { + _writelnWithIndent( + 'shouldUseTypeForInitializerInference: ' + '${e.shouldUseTypeForInitializerInference}', + ); + } + } + void _writeSuperConstructorParameter(ParameterElement e) { if (e is SuperFormalParameterElement) { var superParameter = e.superConstructorParameter; diff --git a/pkg/analyzer/test/src/summary/elements_test.dart b/pkg/analyzer/test/src/summary/elements_test.dart index b524dde02f82..d937516fdaff 100644 --- a/pkg/analyzer/test/src/summary/elements_test.dart +++ b/pkg/analyzer/test/src/summary/elements_test.dart @@ -488,6 +488,7 @@ library topLevelVariables static const b @52 type: int + shouldUseTypeForInitializerInference: false constantInitializer SimpleIdentifier token: a @56 @@ -527,6 +528,7 @@ library topLevelVariables static const b @52 type: int + shouldUseTypeForInitializerInference: false constantInitializer PrefixedIdentifier prefix: SimpleIdentifier @@ -574,6 +576,7 @@ library topLevelVariables static const a @52 type: A + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -622,6 +625,7 @@ library topLevelVariables static const b @62 type: int + shouldUseTypeForInitializerInference: false constantInitializer PropertyAccess target: PrefixedIdentifier @@ -703,6 +707,7 @@ library topLevelVariables static final b @52 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get b @-1 returnType: int @@ -1055,6 +1060,7 @@ library fields x @18 type: dynamic + shouldUseTypeForInitializerInference: true constructors @21 parameters @@ -1082,6 +1088,7 @@ library fields x @18 type: dynamic + shouldUseTypeForInitializerInference: true constructors @21 parameters @@ -1109,6 +1116,7 @@ library fields x @18 type: dynamic + shouldUseTypeForInitializerInference: true constructors @21 parameters @@ -1141,6 +1149,7 @@ library fields x @16 type: dynamic + shouldUseTypeForInitializerInference: false constructors @21 parameters @@ -1176,6 +1185,7 @@ library fields x @16 type: dynamic + shouldUseTypeForInitializerInference: false constructors @21 parameters @@ -1211,6 +1221,7 @@ library fields f @23 type: dynamic Function() + shouldUseTypeForInitializerInference: true constructors @28 parameters @@ -1246,8 +1257,10 @@ library fields x @25 type: int + shouldUseTypeForInitializerInference: true x @35 type: String + shouldUseTypeForInitializerInference: true constructors @10 parameters @@ -1301,6 +1314,7 @@ library fields x @14 type: num + shouldUseTypeForInitializerInference: true constructors @17 parameters @@ -1328,6 +1342,7 @@ library fields x @14 type: num + shouldUseTypeForInitializerInference: true constructors @17 parameters @@ -1355,6 +1370,7 @@ library fields x @14 type: num + shouldUseTypeForInitializerInference: true constructors @17 parameters @@ -1382,6 +1398,7 @@ library fields x @14 type: dynamic + shouldUseTypeForInitializerInference: false constructors @17 parameters @@ -1409,6 +1426,7 @@ library fields x @14 type: dynamic + shouldUseTypeForInitializerInference: false constructors @17 parameters @@ -1436,6 +1454,7 @@ library fields x @14 type: dynamic + shouldUseTypeForInitializerInference: false constructors @17 parameters @@ -1463,6 +1482,7 @@ library fields x @14 type: int + shouldUseTypeForInitializerInference: true constructors @17 parameters @@ -1490,6 +1510,7 @@ library fields x @14 type: int + shouldUseTypeForInitializerInference: true constructors @17 parameters @@ -1521,6 +1542,7 @@ library fields x @14 type: int + shouldUseTypeForInitializerInference: true constructors @17 parameters @@ -1548,6 +1570,7 @@ library fields x @14 type: int + shouldUseTypeForInitializerInference: true constructors @17 parameters @@ -1676,6 +1699,7 @@ library fields final x @18 type: dynamic + shouldUseTypeForInitializerInference: false constructors const @29 constantInitializers @@ -1711,6 +1735,7 @@ library fields final x @18 type: dynamic + shouldUseTypeForInitializerInference: false constructors const @29 constantInitializers @@ -1754,6 +1779,7 @@ library fields final promotable _f @22 type: int + shouldUseTypeForInitializerInference: true constructors const @34 parameters @@ -1795,6 +1821,7 @@ library fields final x @25 type: Object + shouldUseTypeForInitializerInference: true constructors const @36 parameters @@ -1840,6 +1867,7 @@ library fields final x @18 type: dynamic + shouldUseTypeForInitializerInference: false constructors const @29 parameters @@ -3865,6 +3893,7 @@ library fields final x @18 type: dynamic + shouldUseTypeForInitializerInference: false constructors const @29 constantInitializers @@ -3895,6 +3924,7 @@ library fields final x @70 type: dynamic + shouldUseTypeForInitializerInference: false constructors const @81 constantInitializers @@ -3943,6 +3973,7 @@ library fields final x @18 type: dynamic + shouldUseTypeForInitializerInference: false constructors @23 accessors @@ -3952,6 +3983,7 @@ library fields final x @62 type: dynamic + shouldUseTypeForInitializerInference: false constructors @67 accessors @@ -4316,6 +4348,7 @@ library fields abstract i @34 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -4339,6 +4372,7 @@ library fields static const i @27 type: int + shouldUseTypeForInitializerInference: true constantInitializer IntegerLiteral literal: 0 @31 @@ -4362,6 +4396,7 @@ library fields static late const i @32 type: int + shouldUseTypeForInitializerInference: true constantInitializer IntegerLiteral literal: 0 @36 @@ -4387,6 +4422,7 @@ library fields covariant x @26 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -4417,6 +4453,7 @@ library x @38 documentationComment: /**\n * Docs\n */ type: dynamic + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -4446,6 +4483,7 @@ library fields foo @16 type: int + shouldUseTypeForInitializerInference: true id: field_0 getter: getter_0 setter: setter_0 @@ -4490,6 +4528,7 @@ library fields foo @16 type: int + shouldUseTypeForInitializerInference: true id: field_0 getter: getter_0 setter: setter_0 @@ -4535,6 +4574,7 @@ library fields external i @34 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -4563,6 +4603,7 @@ library fields final x @18 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 42 @22 @@ -4599,6 +4640,7 @@ library fields final f @46 type: A + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @50 @@ -4671,6 +4713,7 @@ library fields final x @18 type: int + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -4696,6 +4739,7 @@ library fields final foo @22 type: int + shouldUseTypeForInitializerInference: true id: field_0 getter: getter_0 setter: setter_0 @@ -4732,6 +4776,7 @@ library fields v @24 type: int + shouldUseTypeForInitializerInference: true constructors @27 parameters @@ -4769,6 +4814,7 @@ library fields x @14 type: dynamic + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -4792,6 +4838,7 @@ library fields late x @19 type: dynamic + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -4815,6 +4862,7 @@ library fields v @14 type: num + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -4838,6 +4886,7 @@ library fields v @14 type: int + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -4863,6 +4912,7 @@ library fields v @24 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 superConstructor: self::@class::D::@constructor::new @@ -4916,6 +4966,7 @@ library fields final f @107 type: List + shouldUseTypeForInitializerInference: true constantInitializer ListLiteral leftBracket: [ @111 @@ -4935,6 +4986,7 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @10 @@ -4955,6 +5007,7 @@ library fields static v @21 type: int + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -4997,6 +5050,7 @@ library fields final foo @93 type: double + shouldUseTypeForInitializerInference: true constantInitializer IntegerLiteral literal: 2 @99 @@ -5031,6 +5085,7 @@ library fields final _foo @23 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5055,6 +5110,7 @@ library fields final promotable _foo @23 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5083,6 +5139,7 @@ library fields final _foo @38 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5107,6 +5164,7 @@ library fields final promotable _foo @23 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5131,6 +5189,7 @@ library fields final _foo @23 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5155,6 +5214,7 @@ library fields final promotable _foo @23 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5179,6 +5239,7 @@ library fields final promotable _foo @23 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5200,6 +5261,7 @@ library fields final _foo @39 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5229,6 +5291,7 @@ library fields final _foo @23 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5265,10 +5328,12 @@ library fields final promotable _foo @23 type: int? + shouldUseTypeForInitializerInference: true class B @90 fields final promotable _foo @107 type: int? + shouldUseTypeForInitializerInference: true mixins mixin M @54 superclassConstraints @@ -5276,6 +5341,7 @@ library fields final promotable _foo @71 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5311,10 +5377,12 @@ library fields final promotable _foo @23 type: int? + shouldUseTypeForInitializerInference: true class B @54 fields final promotable _foo @71 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5346,6 +5414,7 @@ library fields final _foo @23 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5378,10 +5447,12 @@ library fields final _foo @23 type: int? + shouldUseTypeForInitializerInference: true class B @54 fields final _foo @71 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5411,6 +5482,7 @@ library fields final _foo @23 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5450,6 +5522,7 @@ library fields final promotable _foo @41 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5479,6 +5552,7 @@ library fields final _foo @23 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5513,6 +5587,7 @@ library fields final _foo @23 type: int? + shouldUseTypeForInitializerInference: true mixins mixin M @54 superclassConstraints @@ -5520,6 +5595,7 @@ library fields final _foo @71 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5550,6 +5626,7 @@ library fields final promotable _foo @23 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5569,6 +5646,7 @@ library fields _foo @17 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5588,6 +5666,7 @@ library fields field @17 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -5610,8 +5689,10 @@ library fields final promotable _foo @23 type: int? + shouldUseTypeForInitializerInference: true final bar @37 type: int + shouldUseTypeForInitializerInference: false '''); } @@ -5628,6 +5709,7 @@ library fields static const x @25 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @29 @@ -5657,6 +5739,7 @@ library fields final b @35 type: double + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -5683,6 +5766,7 @@ library fields final b @46 type: double + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -5693,6 +5777,7 @@ library topLevelVariables static final a @19 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: int @@ -5712,6 +5797,7 @@ library fields final x @18 type: int + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -5733,6 +5819,7 @@ library fields static final x @25 type: int + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -5751,6 +5838,7 @@ library fields static i @21 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -5779,6 +5867,7 @@ library fields static final f @25 type: int + shouldUseTypeForInitializerInference: false constructors const @40 accessors @@ -5797,6 +5886,7 @@ library fields static final x @23 type: int + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -5815,6 +5905,7 @@ library fields static late i @26 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -5828,6 +5919,103 @@ library '''); } + test_class_field_type_explicit() async { + var library = await buildLibrary(r''' +class C { + int a = 0; +} +'''); + + checkElementText(library, r''' +library + definingUnit + classes + class C @6 + fields + a @16 + type: int + shouldUseTypeForInitializerInference: true + constructors + synthetic @-1 + accessors + synthetic get a @-1 + returnType: int + synthetic set a @-1 + parameters + requiredPositional _a @-1 + type: int + returnType: void +'''); + } + + test_class_field_type_inferred_fromInitializer() async { + var library = await buildLibrary(r''' +class C { + var foo = 0; +} +'''); + + checkElementText(library, r''' +library + definingUnit + classes + class C @6 + fields + foo @16 + type: int + shouldUseTypeForInitializerInference: false + constructors + synthetic @-1 + accessors + synthetic get foo @-1 + returnType: int + synthetic set foo @-1 + parameters + requiredPositional _foo @-1 + type: int + returnType: void +'''); + } + + test_class_field_type_inferred_fromSuper() async { + var library = await buildLibrary(r''' +abstract class A { + int get foo; +} + +class B extends A { + final foo = 0; +} +'''); + + checkElementText(library, r''' +library + definingUnit + classes + abstract class A @15 + fields + synthetic foo @-1 + type: int + constructors + synthetic @-1 + accessors + abstract get foo @29 + returnType: int + class B @43 + supertype: A + fields + final foo @65 + type: int + shouldUseTypeForInitializerInference: true + constructors + synthetic @-1 + superConstructor: self::@class::A::@constructor::new + accessors + synthetic get foo @-1 + returnType: int +'''); + } + test_class_field_type_inferred_Never() async { var library = await buildLibrary(r''' class C { @@ -5843,6 +6031,7 @@ library fields a @16 type: Never + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -5879,6 +6068,7 @@ library fields b @33 type: int + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -5902,6 +6092,7 @@ library fields x @14 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -5925,6 +6116,7 @@ library fields x @14 type: int + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -5948,8 +6140,10 @@ library fields i @14 type: int + shouldUseTypeForInitializerInference: true j @21 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -5984,6 +6178,7 @@ library fields late foo @21 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -6011,6 +6206,7 @@ library fields late final foo @27 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -6038,6 +6234,7 @@ library fields late final foo @27 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -6071,6 +6268,7 @@ library fields late f @62 type: int + shouldUseTypeForInitializerInference: false constructors synthetic @-1 superConstructor: self::@class::A::@constructor::new @@ -6113,6 +6311,7 @@ library fields late f @64 type: int + shouldUseTypeForInitializerInference: false constructors synthetic @-1 superConstructor: self::@class::A::@constructor::new @@ -7552,6 +7751,7 @@ library topLevelVariables static c @13 type: C + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -7578,6 +7778,7 @@ library topLevelVariables static c @14 type: C? + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C? @@ -7605,6 +7806,7 @@ library topLevelVariables static c @28 type: C* + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C* @@ -7758,6 +7960,7 @@ library fields t @16 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -7773,6 +7976,7 @@ library fields t @50 type: double + shouldUseTypeForInitializerInference: true constructors synthetic @-1 superConstructor: self::@class::A::@constructor::new @@ -9644,6 +9848,7 @@ library fields x @105 type: int + shouldUseTypeForInitializerInference: true synthetic a @-1 type: int synthetic b @-1 @@ -9712,6 +9917,7 @@ library topLevelVariables static final f @6 type: V Function(U, V) + shouldUseTypeForInitializerInference: false accessors synthetic static get f @-1 returnType: V Function(U, V) @@ -9735,6 +9941,7 @@ library topLevelVariables static final f @19 type: double Function(int) + shouldUseTypeForInitializerInference: false accessors synthetic static get f @-1 returnType: double Function(int) @@ -10311,6 +10518,7 @@ library codeOffset: 11 codeLength: 3 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -10329,6 +10537,7 @@ library codeOffset: 16 codeLength: 3 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -10347,6 +10556,7 @@ library codeOffset: 21 codeLength: 3 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -10532,22 +10742,27 @@ library codeOffset: 12 codeLength: 16 type: int + shouldUseTypeForInitializerInference: true withoutInit @37 codeOffset: 33 codeLength: 15 type: int + shouldUseTypeForInitializerInference: true multiWithInit @57 codeOffset: 53 codeLength: 21 type: int + shouldUseTypeForInitializerInference: true multiWithoutInit @76 codeOffset: 76 codeLength: 16 type: int + shouldUseTypeForInitializerInference: true multiWithInit2 @94 codeOffset: 94 codeLength: 18 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -10629,11 +10844,13 @@ library codeOffset: 12 codeLength: 51 type: int + shouldUseTypeForInitializerInference: true hasDocComment2 @65 documentationComment: /// Comment 1.\n/// Comment 2. codeOffset: 65 codeLength: 14 type: int + shouldUseTypeForInitializerInference: true hasAnnotation @100 metadata Annotation @@ -10649,6 +10866,7 @@ library codeOffset: 84 codeLength: 29 type: int + shouldUseTypeForInitializerInference: true hasAnnotation2 @115 metadata Annotation @@ -10664,6 +10882,7 @@ library codeOffset: 115 codeLength: 14 type: int + shouldUseTypeForInitializerInference: true annotationThenComment @184 documentationComment: /// Comment 1.\n/// Comment 2. metadata @@ -10680,6 +10899,7 @@ library codeOffset: 134 codeLength: 71 type: int + shouldUseTypeForInitializerInference: true annotationThenComment2 @207 documentationComment: /// Comment 1.\n/// Comment 2. metadata @@ -10696,6 +10916,7 @@ library codeOffset: 207 codeLength: 22 type: int + shouldUseTypeForInitializerInference: true commentThenAnnotation @284 documentationComment: /// Comment 1.\n/// Comment 2. metadata @@ -10712,6 +10933,7 @@ library codeOffset: 234 codeLength: 71 type: int + shouldUseTypeForInitializerInference: true commentThenAnnotation2 @307 documentationComment: /// Comment 1.\n/// Comment 2. metadata @@ -10728,6 +10950,7 @@ library codeOffset: 307 codeLength: 22 type: int + shouldUseTypeForInitializerInference: true commentAroundAnnotation @384 documentationComment: /// Comment 2. metadata @@ -10744,6 +10967,7 @@ library codeOffset: 351 codeLength: 56 type: int + shouldUseTypeForInitializerInference: true commentAroundAnnotation2 @409 documentationComment: /// Comment 2. metadata @@ -10760,6 +10984,7 @@ library codeOffset: 409 codeLength: 24 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -11397,22 +11622,27 @@ library codeOffset: 0 codeLength: 24 type: int + shouldUseTypeForInitializerInference: true static withoutInit @31 codeOffset: 27 codeLength: 15 type: int + shouldUseTypeForInitializerInference: true static multiWithInit @49 codeOffset: 45 codeLength: 21 type: int + shouldUseTypeForInitializerInference: true static multiWithoutInit @68 codeOffset: 68 codeLength: 16 type: int + shouldUseTypeForInitializerInference: true static multiWithInit2 @86 codeOffset: 86 codeLength: 18 type: int + shouldUseTypeForInitializerInference: true accessors synthetic static get withInit @-1 returnType: int @@ -11486,11 +11716,13 @@ library codeOffset: 0 codeLength: 47 type: int + shouldUseTypeForInitializerInference: true static hasDocComment2 @49 documentationComment: /// Comment 1.\n/// Comment 2. codeOffset: 49 codeLength: 14 type: int + shouldUseTypeForInitializerInference: true static hasAnnotation @80 metadata Annotation @@ -11506,6 +11738,7 @@ library codeOffset: 66 codeLength: 27 type: int + shouldUseTypeForInitializerInference: true static hasAnnotation2 @95 metadata Annotation @@ -11521,6 +11754,7 @@ library codeOffset: 95 codeLength: 14 type: int + shouldUseTypeForInitializerInference: true static annotationThenComment @156 documentationComment: /// Comment 1.\n/// Comment 2. metadata @@ -11537,6 +11771,7 @@ library codeOffset: 112 codeLength: 65 type: int + shouldUseTypeForInitializerInference: true static annotationThenComment2 @179 documentationComment: /// Comment 1.\n/// Comment 2. metadata @@ -11553,6 +11788,7 @@ library codeOffset: 179 codeLength: 22 type: int + shouldUseTypeForInitializerInference: true static commentThenAnnotation @248 documentationComment: /// Comment 1.\n/// Comment 2. metadata @@ -11569,6 +11805,7 @@ library codeOffset: 204 codeLength: 65 type: int + shouldUseTypeForInitializerInference: true static commentThenAnnotation2 @271 documentationComment: /// Comment 1.\n/// Comment 2. metadata @@ -11585,6 +11822,7 @@ library codeOffset: 271 codeLength: 22 type: int + shouldUseTypeForInitializerInference: true static commentAroundAnnotation @340 documentationComment: /// Comment 2. metadata @@ -11601,6 +11839,7 @@ library codeOffset: 311 codeLength: 52 type: int + shouldUseTypeForInitializerInference: true static commentAroundAnnotation2 @365 documentationComment: /// Comment 2. metadata @@ -11617,6 +11856,7 @@ library codeOffset: 365 codeLength: 24 type: int + shouldUseTypeForInitializerInference: true accessors synthetic static get hasDocComment @-1 returnType: int @@ -11747,12 +11987,14 @@ library topLevelVariables static const a @10 type: num + shouldUseTypeForInitializerInference: true constantInitializer IntegerLiteral literal: 0 @14 staticType: int static const b @23 type: int + shouldUseTypeForInitializerInference: false constantInitializer AsExpression expression: SimpleIdentifier @@ -11786,12 +12028,14 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @10 staticType: int static const b @19 type: int + shouldUseTypeForInitializerInference: false constantInitializer ParenthesizedExpression leftParenthesis: ( @23 @@ -11830,6 +12074,7 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer CascadeExpression target: IntegerLiteral @@ -11876,12 +12121,14 @@ library fields static const f1 @29 type: int + shouldUseTypeForInitializerInference: true constantInitializer IntegerLiteral literal: 1 @34 staticType: int static const f2 @56 type: int + shouldUseTypeForInitializerInference: true constantInitializer PrefixedIdentifier prefix: SimpleIdentifier @@ -11897,6 +12144,7 @@ library staticType: int static const f3 @67 type: int + shouldUseTypeForInitializerInference: true constantInitializer PrefixedIdentifier prefix: SimpleIdentifier @@ -11943,6 +12191,7 @@ library fields final t @23 type: T + shouldUseTypeForInitializerInference: true constructors const @34 parameters @@ -11962,6 +12211,7 @@ library topLevelVariables static const x @85 type: Object + shouldUseTypeForInitializerInference: true constantInitializer InstanceCreationExpression keyword: const @89 @@ -11985,6 +12235,7 @@ library staticType: C static const y @114 type: Object + shouldUseTypeForInitializerInference: true constantInitializer InstanceCreationExpression keyword: const @118 @@ -12051,6 +12302,7 @@ library topLevelVariables static const v @31 type: A Function() + shouldUseTypeForInitializerInference: false constantInitializer ConstructorReference constructorName: ConstructorName @@ -12088,6 +12340,7 @@ library fields final f @22 type: int + shouldUseTypeForInitializerInference: true constantInitializer IntegerLiteral literal: 42 @26 @@ -12112,6 +12365,7 @@ library topLevelVariables static const v @44 type: void Function(int) + shouldUseTypeForInitializerInference: true constantInitializer FunctionReference function: SimpleIdentifier @@ -12146,6 +12400,7 @@ library topLevelVariables static const v @24 type: void Function(int) + shouldUseTypeForInitializerInference: false constantInitializer FunctionReference function: SimpleIdentifier @@ -12191,6 +12446,7 @@ library topLevelVariables static const a @6 type: List + shouldUseTypeForInitializerInference: false constantInitializer ListLiteral leftBracket: [ @10 @@ -12202,12 +12458,14 @@ library staticType: List static const b @21 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @25 staticType: int static const c @34 type: int + shouldUseTypeForInitializerInference: false constantInitializer IndexExpression target: SimpleIdentifier @@ -12286,6 +12544,7 @@ library topLevelVariables static const values @131 type: List> + shouldUseTypeForInitializerInference: true constantInitializer ListLiteral leftBracket: [ @140 @@ -12353,6 +12612,7 @@ library fields static const f @25 type: int + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -12398,6 +12658,7 @@ library fields final f @18 type: int + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -12419,6 +12680,7 @@ library topLevelVariables static const v @6 type: int Function() + shouldUseTypeForInitializerInference: false constantInitializer FunctionExpression parameters: FormalParameterList @@ -12446,6 +12708,7 @@ library topLevelVariables static const v @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: FunctionExpression @@ -12492,6 +12755,7 @@ library topLevelVariables static const v @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -12531,12 +12795,14 @@ library topLevelVariables static const a @10 type: int + shouldUseTypeForInitializerInference: true constantInitializer IntegerLiteral literal: 0 @14 staticType: int static const b @28 type: bool + shouldUseTypeForInitializerInference: true constantInitializer BinaryExpression leftOperand: SimpleIdentifier @@ -12587,6 +12853,7 @@ library topLevelVariables static const V @51 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @55 @@ -12657,6 +12924,7 @@ library topLevelVariables static const V @23 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @27 @@ -12727,6 +12995,7 @@ library topLevelVariables static const V @28 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @32 @@ -12809,6 +13078,7 @@ library topLevelVariables static const V @37 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @41 @@ -12854,6 +13124,7 @@ library topLevelVariables static const V @37 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @41 @@ -12911,6 +13182,7 @@ library topLevelVariables static const V @23 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @27 @@ -12968,6 +13240,7 @@ library topLevelVariables static const V @28 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @32 @@ -13045,6 +13318,7 @@ library topLevelVariables static const V @79 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @83 @@ -13118,6 +13392,7 @@ library topLevelVariables static const V @23 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @27 @@ -13162,6 +13437,7 @@ library topLevelVariables static const V @28 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @32 @@ -13211,6 +13487,7 @@ library topLevelVariables static const V @17 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @21 @@ -13247,6 +13524,7 @@ library topLevelVariables static const V @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @10 @@ -13293,6 +13571,7 @@ library topLevelVariables static const V @28 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @32 @@ -13341,6 +13620,7 @@ library topLevelVariables static const V @28 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @32 @@ -13385,6 +13665,7 @@ library topLevelVariables static const V @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @10 @@ -13437,6 +13718,7 @@ library topLevelVariables static const V @20 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @24 @@ -13480,6 +13762,7 @@ library topLevelVariables static const V @31 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @35 @@ -13519,6 +13802,7 @@ library topLevelVariables static const V @23 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @27 @@ -13558,6 +13842,7 @@ library topLevelVariables static const V @28 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @32 @@ -13597,6 +13882,7 @@ library topLevelVariables static const V @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @10 @@ -13632,6 +13918,7 @@ library topLevelVariables static const V @28 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @32 @@ -13671,6 +13958,7 @@ library topLevelVariables static const V @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @10 @@ -13711,12 +13999,14 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @10 staticType: int static const b @19 type: bool + shouldUseTypeForInitializerInference: false constantInitializer IsExpression expression: SimpleIdentifier @@ -13754,6 +14044,7 @@ library fields static const F @32 type: String + shouldUseTypeForInitializerInference: true constantInitializer SimpleStringLiteral literal: '' @36 @@ -13765,6 +14056,7 @@ library topLevelVariables static const v @52 type: int + shouldUseTypeForInitializerInference: true constantInitializer PropertyAccess target: PrefixedIdentifier @@ -13809,6 +14101,7 @@ library topLevelVariables static const v @27 type: int + shouldUseTypeForInitializerInference: true constantInitializer PropertyAccess target: PrefixedIdentifier @@ -13853,6 +14146,7 @@ library topLevelVariables static const v @32 type: int + shouldUseTypeForInitializerInference: true constantInitializer PropertyAccess target: PropertyAccess @@ -13896,6 +14190,7 @@ library topLevelVariables static const v @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer PropertyAccess target: SimpleStringLiteral @@ -13923,11 +14218,13 @@ library topLevelVariables static const S @13 type: String + shouldUseTypeForInitializerInference: true constantInitializer SimpleStringLiteral literal: 'abc' @17 static const v @30 type: int + shouldUseTypeForInitializerInference: false constantInitializer PrefixedIdentifier prefix: SimpleIdentifier @@ -13965,6 +14262,7 @@ library topLevelVariables static const v @23 type: int + shouldUseTypeForInitializerInference: false constantInitializer PrefixedIdentifier prefix: SimpleIdentifier @@ -14000,6 +14298,7 @@ library topLevelVariables static const v @28 type: int + shouldUseTypeForInitializerInference: false constantInitializer PropertyAccess target: PrefixedIdentifier @@ -14046,6 +14345,7 @@ library topLevelVariables static const v @47 type: int Function() + shouldUseTypeForInitializerInference: false constantInitializer PrefixedIdentifier prefix: SimpleIdentifier @@ -14075,6 +14375,7 @@ library topLevelVariables static const x @13 type: Object + shouldUseTypeForInitializerInference: true constantInitializer ListLiteral constKeyword: const @17 @@ -14118,6 +14419,7 @@ library topLevelVariables static const x @13 type: Object + shouldUseTypeForInitializerInference: true constantInitializer ListLiteral constKeyword: const @17 @@ -14168,6 +14470,7 @@ library topLevelVariables static const x @13 type: Object + shouldUseTypeForInitializerInference: true constantInitializer ListLiteral constKeyword: const @17 @@ -14194,6 +14497,7 @@ library topLevelVariables static const x @13 type: Object + shouldUseTypeForInitializerInference: true constantInitializer ListLiteral constKeyword: const @17 @@ -14247,6 +14551,7 @@ library topLevelVariables static const x @13 type: Object + shouldUseTypeForInitializerInference: true constantInitializer ListLiteral constKeyword: const @17 @@ -14300,6 +14605,7 @@ library topLevelVariables static const x @13 type: Object + shouldUseTypeForInitializerInference: true constantInitializer SetOrMapLiteral constKeyword: const @17 @@ -14358,6 +14664,7 @@ library topLevelVariables static const x @13 type: Object + shouldUseTypeForInitializerInference: true constantInitializer SetOrMapLiteral constKeyword: const @17 @@ -14390,6 +14697,7 @@ library topLevelVariables static const x @13 type: Object + shouldUseTypeForInitializerInference: true constantInitializer SetOrMapLiteral constKeyword: const @17 @@ -14462,6 +14770,7 @@ library topLevelVariables static const x @13 type: Object + shouldUseTypeForInitializerInference: true constantInitializer SetOrMapLiteral constKeyword: const @17 @@ -14535,6 +14844,7 @@ library topLevelVariables static const b @24 type: int + shouldUseTypeForInitializerInference: false constantInitializer MethodInvocation methodName: SimpleIdentifier @@ -14592,6 +14902,7 @@ library fields final x @18 type: dynamic + shouldUseTypeForInitializerInference: false constructors const @29 parameters @@ -14627,6 +14938,7 @@ library fields final x @18 type: dynamic + shouldUseTypeForInitializerInference: false constructors const @29 parameters @@ -14666,6 +14978,7 @@ library fields final x @18 type: dynamic + shouldUseTypeForInitializerInference: false constructors const @29 parameters @@ -14802,12 +15115,14 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @10 staticType: int static const b @19 type: int + shouldUseTypeForInitializerInference: false constantInitializer PostfixExpression operand: SimpleIdentifier @@ -14840,12 +15155,14 @@ library topLevelVariables static const a @11 type: int? + shouldUseTypeForInitializerInference: true constantInitializer IntegerLiteral literal: 0 @15 staticType: int static const b @24 type: int + shouldUseTypeForInitializerInference: false constantInitializer PostfixExpression operand: SimpleIdentifier @@ -14874,12 +15191,14 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @10 staticType: int static const b @19 type: int + shouldUseTypeForInitializerInference: false constantInitializer PrefixExpression operator: - @23 @@ -14916,6 +15235,7 @@ library topLevelVariables static const b @23 type: int + shouldUseTypeForInitializerInference: false constantInitializer PrefixExpression operator: - @27 @@ -14942,12 +15262,14 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @10 staticType: int static const b @19 type: int + shouldUseTypeForInitializerInference: false constantInitializer PrefixExpression operator: ++ @23 @@ -14980,12 +15302,14 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @10 staticType: int static const b @19 type: (int, {int a}) + shouldUseTypeForInitializerInference: false constantInitializer RecordLiteral leftParenthesis: ( @23 @@ -15026,12 +15350,14 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @10 staticType: int static const b @19 type: (int, {int a}) + shouldUseTypeForInitializerInference: false constantInitializer RecordLiteral constKeyword: const @23 @@ -15077,6 +15403,7 @@ library fields static const F @29 type: int + shouldUseTypeForInitializerInference: true constantInitializer IntegerLiteral literal: 42 @33 @@ -15089,6 +15416,7 @@ library topLevelVariables static const V @45 type: int + shouldUseTypeForInitializerInference: false constantInitializer PrefixedIdentifier prefix: SimpleIdentifier @@ -15126,6 +15454,7 @@ library topLevelVariables static const V @23 type: int + shouldUseTypeForInitializerInference: false constantInitializer PrefixedIdentifier prefix: SimpleIdentifier @@ -15163,6 +15492,7 @@ library topLevelVariables static const V @28 type: int + shouldUseTypeForInitializerInference: false constantInitializer PropertyAccess target: PrefixedIdentifier @@ -15214,6 +15544,7 @@ library topLevelVariables static const V @57 type: int Function(int, String) + shouldUseTypeForInitializerInference: false constantInitializer PrefixedIdentifier prefix: SimpleIdentifier @@ -15251,6 +15582,7 @@ library topLevelVariables static const V @23 type: int Function(int, String) + shouldUseTypeForInitializerInference: false constantInitializer PrefixedIdentifier prefix: SimpleIdentifier @@ -15288,6 +15620,7 @@ library topLevelVariables static const V @28 type: int Function(int, String) + shouldUseTypeForInitializerInference: false constantInitializer PropertyAccess target: PrefixedIdentifier @@ -15338,6 +15671,7 @@ library topLevelVariables static const x @59 type: void Function() + shouldUseTypeForInitializerInference: false constantInitializer PrefixedIdentifier prefix: SimpleIdentifier @@ -15368,6 +15702,7 @@ library topLevelVariables static const V @15 type: dynamic Function() + shouldUseTypeForInitializerInference: false constantInitializer SimpleIdentifier token: foo @19 @@ -15393,6 +15728,7 @@ library topLevelVariables static const V @26 type: R Function(P) + shouldUseTypeForInitializerInference: false constantInitializer SimpleIdentifier token: foo @30 @@ -15429,6 +15765,7 @@ library topLevelVariables static const V @23 type: dynamic Function() + shouldUseTypeForInitializerInference: false constantInitializer SimpleIdentifier token: foo @27 @@ -15456,6 +15793,7 @@ library topLevelVariables static const V @28 type: dynamic Function() + shouldUseTypeForInitializerInference: false constantInitializer PrefixedIdentifier prefix: SimpleIdentifier @@ -15486,12 +15824,14 @@ library topLevelVariables static const A @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 1 @10 staticType: int static const B @19 type: int + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: SimpleIdentifier @@ -15529,6 +15869,7 @@ library topLevelVariables static const B @23 type: int + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: SimpleIdentifier @@ -15564,6 +15905,7 @@ library topLevelVariables static const B @28 type: int + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: PrefixedIdentifier @@ -15624,6 +15966,7 @@ library fields static const enumConstant a @33 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -15640,6 +15983,7 @@ library staticType: E static const enumConstant b @36 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -15656,6 +16000,7 @@ library staticType: E static const enumConstant c @39 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -15714,6 +16059,7 @@ library topLevelVariables static const vDynamic @76 type: Type + shouldUseTypeForInitializerInference: false constantInitializer SimpleIdentifier token: dynamic @87 @@ -15721,6 +16067,7 @@ library staticType: Type static const vNull @102 type: Type + shouldUseTypeForInitializerInference: false constantInitializer SimpleIdentifier token: Null @110 @@ -15728,6 +16075,7 @@ library staticType: Type static const vObject @122 type: Type + shouldUseTypeForInitializerInference: false constantInitializer SimpleIdentifier token: Object @132 @@ -15735,6 +16083,7 @@ library staticType: Type static const vClass @146 type: Type + shouldUseTypeForInitializerInference: false constantInitializer SimpleIdentifier token: C @155 @@ -15742,6 +16091,7 @@ library staticType: Type static const vGenericClass @164 type: Type + shouldUseTypeForInitializerInference: false constantInitializer SimpleIdentifier token: D @180 @@ -15749,6 +16099,7 @@ library staticType: Type static const vEnum @189 type: Type + shouldUseTypeForInitializerInference: false constantInitializer SimpleIdentifier token: E @197 @@ -15756,6 +16107,7 @@ library staticType: Type static const vFunctionTypeAlias @206 type: Type + shouldUseTypeForInitializerInference: false constantInitializer SimpleIdentifier token: F @227 @@ -15794,6 +16146,7 @@ library fields final f @31 type: List + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -15827,6 +16180,7 @@ library topLevelVariables static const vClass @23 type: Type + shouldUseTypeForInitializerInference: false constantInitializer SimpleIdentifier token: C @32 @@ -15834,6 +16188,7 @@ library staticType: Type static const vEnum @41 type: Type + shouldUseTypeForInitializerInference: false constantInitializer SimpleIdentifier token: E @49 @@ -15841,6 +16196,7 @@ library staticType: Type static const vFunctionTypeAlias @58 type: Type + shouldUseTypeForInitializerInference: false constantInitializer SimpleIdentifier token: F @79 @@ -15876,6 +16232,7 @@ library topLevelVariables static const vClass @28 type: Type + shouldUseTypeForInitializerInference: false constantInitializer PrefixedIdentifier prefix: SimpleIdentifier @@ -15891,6 +16248,7 @@ library staticType: Type static const vEnum @48 type: Type + shouldUseTypeForInitializerInference: false constantInitializer PrefixedIdentifier prefix: SimpleIdentifier @@ -15906,6 +16264,7 @@ library staticType: Type static const vFunctionTypeAlias @67 type: Type + shouldUseTypeForInitializerInference: false constantInitializer PrefixedIdentifier prefix: SimpleIdentifier @@ -15946,6 +16305,7 @@ library fields final f @21 type: List + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -15964,6 +16324,7 @@ library topLevelVariables static const V @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer SimpleIdentifier token: foo @10 @@ -15990,6 +16351,7 @@ library topLevelVariables static const V @17 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer PrefixedIdentifier prefix: SimpleIdentifier @@ -16025,6 +16387,7 @@ library topLevelVariables static const V @30 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer PropertyAccess target: PrefixedIdentifier @@ -16061,6 +16424,7 @@ library topLevelVariables static const x @13 type: Object + shouldUseTypeForInitializerInference: true constantInitializer SetOrMapLiteral constKeyword: const @17 @@ -16108,6 +16472,7 @@ library topLevelVariables static const x @13 type: Object + shouldUseTypeForInitializerInference: true constantInitializer SetOrMapLiteral constKeyword: const @17 @@ -16135,6 +16500,7 @@ library topLevelVariables static const x @13 type: Object + shouldUseTypeForInitializerInference: true constantInitializer SetOrMapLiteral constKeyword: const @17 @@ -16190,6 +16556,7 @@ library topLevelVariables static const x @13 type: Object + shouldUseTypeForInitializerInference: true constantInitializer SetOrMapLiteral constKeyword: const @17 @@ -16262,6 +16629,7 @@ library topLevelVariables static const vEqual @6 type: bool + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -16276,6 +16644,7 @@ library staticType: bool static const vAnd @29 type: bool + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: BooleanLiteral @@ -16290,6 +16659,7 @@ library staticType: bool static const vOr @57 type: bool + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: BooleanLiteral @@ -16304,6 +16674,7 @@ library staticType: bool static const vBitXor @84 type: int + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -16318,6 +16689,7 @@ library staticType: int static const vBitAnd @107 type: int + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -16332,6 +16704,7 @@ library staticType: int static const vBitOr @130 type: int + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -16346,6 +16719,7 @@ library staticType: int static const vBitShiftLeft @152 type: int + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -16360,6 +16734,7 @@ library staticType: int static const vBitShiftRight @182 type: int + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -16374,6 +16749,7 @@ library staticType: int static const vAdd @213 type: int + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -16388,6 +16764,7 @@ library staticType: int static const vSubtract @233 type: int + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -16402,6 +16779,7 @@ library staticType: int static const vMiltiply @258 type: int + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -16416,6 +16794,7 @@ library staticType: int static const vDivide @283 type: double + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -16430,6 +16809,7 @@ library staticType: double static const vFloorDivide @306 type: int + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -16444,6 +16824,7 @@ library staticType: int static const vModulo @335 type: int + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -16458,6 +16839,7 @@ library staticType: int static const vGreater @358 type: bool + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -16472,6 +16854,7 @@ library staticType: bool static const vGreaterEqual @382 type: bool + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -16486,6 +16869,7 @@ library staticType: bool static const vLess @412 type: bool + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -16500,6 +16884,7 @@ library staticType: bool static const vLessEqual @433 type: bool + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -16562,6 +16947,7 @@ library topLevelVariables static const vConditional @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer ConditionalExpression condition: ParenthesizedExpression @@ -16604,6 +16990,7 @@ library topLevelVariables static const vIdentical @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer ConditionalExpression condition: ParenthesizedExpression @@ -16646,6 +17033,7 @@ library topLevelVariables static const vIfNull @6 type: num + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -16686,30 +17074,35 @@ library topLevelVariables static const vNull @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @14 staticType: Null static const vBoolFalse @26 type: bool + shouldUseTypeForInitializerInference: false constantInitializer BooleanLiteral literal: false @39 staticType: bool static const vBoolTrue @52 type: bool + shouldUseTypeForInitializerInference: false constantInitializer BooleanLiteral literal: true @64 staticType: bool static const vIntPositive @76 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 1 @91 staticType: int static const vIntNegative @100 type: int + shouldUseTypeForInitializerInference: false constantInitializer PrefixExpression operator: - @115 @@ -16720,35 +17113,41 @@ library staticType: int static const vIntLong1 @125 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0x7FFFFFFFFFFFFFFF @137 staticType: int static const vIntLong2 @163 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0xFFFFFFFFFFFFFFFF @175 staticType: int static const vIntLong3 @201 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0x8000000000000000 @213 staticType: int static const vDouble @239 type: double + shouldUseTypeForInitializerInference: false constantInitializer DoubleLiteral literal: 2.3 @249 staticType: double static const vString @260 type: String + shouldUseTypeForInitializerInference: false constantInitializer SimpleStringLiteral literal: 'abc' @270 static const vStringConcat @283 type: String + shouldUseTypeForInitializerInference: false constantInitializer AdjacentStrings strings @@ -16760,6 +17159,7 @@ library stringValue: aaabbb static const vStringInterpolation @318 type: String + shouldUseTypeForInitializerInference: false constantInitializer StringInterpolation elements @@ -16785,6 +17185,7 @@ library stringValue: null static const vSymbol @372 type: Symbol + shouldUseTypeForInitializerInference: false constantInitializer SymbolLiteral poundSign: # @382 @@ -16836,12 +17237,14 @@ library topLevelVariables static const a @11 type: int? + shouldUseTypeForInitializerInference: true constantInitializer IntegerLiteral literal: 0 @15 staticType: int static const b @24 type: String? + shouldUseTypeForInitializerInference: false constantInitializer MethodInvocation target: SimpleIdentifier @@ -16877,12 +17280,14 @@ library topLevelVariables static const a @11 type: int? + shouldUseTypeForInitializerInference: true constantInitializer IntegerLiteral literal: 0 @15 staticType: int static const b @24 type: int? + shouldUseTypeForInitializerInference: false constantInitializer CascadeExpression target: SimpleIdentifier @@ -16924,11 +17329,13 @@ library topLevelVariables static const a @14 type: String? + shouldUseTypeForInitializerInference: true constantInitializer SimpleStringLiteral literal: '' @18 static const b @40 type: List + shouldUseTypeForInitializerInference: true constantInitializer ListLiteral leftBracket: [ @44 @@ -16966,6 +17373,7 @@ library topLevelVariables static const v1 @10 type: int + shouldUseTypeForInitializerInference: true constantInitializer BinaryExpression leftOperand: ParenthesizedExpression @@ -16992,6 +17400,7 @@ library staticType: int static const v2 @38 type: int + shouldUseTypeForInitializerInference: true constantInitializer PrefixExpression operator: - @43 @@ -17014,6 +17423,7 @@ library staticType: int static const v3 @63 type: int + shouldUseTypeForInitializerInference: true constantInitializer PropertyAccess target: ParenthesizedExpression @@ -17058,6 +17468,7 @@ library topLevelVariables static const vNotEqual @6 type: bool + shouldUseTypeForInitializerInference: false constantInitializer BinaryExpression leftOperand: IntegerLiteral @@ -17072,6 +17483,7 @@ library staticType: bool static const vNot @32 type: bool + shouldUseTypeForInitializerInference: false constantInitializer PrefixExpression operator: ! @39 @@ -17082,6 +17494,7 @@ library staticType: bool static const vNegate @52 type: int + shouldUseTypeForInitializerInference: false constantInitializer PrefixExpression operator: - @62 @@ -17092,6 +17505,7 @@ library staticType: int static const vComplement @72 type: int + shouldUseTypeForInitializerInference: false constantInitializer PrefixExpression operator: ~ @86 @@ -17122,6 +17536,7 @@ library topLevelVariables static const vSuper @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer SuperExpression superKeyword: super @15 @@ -17142,6 +17557,7 @@ library topLevelVariables static const vThis @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer ThisExpression thisKeyword: this @14 @@ -17162,6 +17578,7 @@ library topLevelVariables static const c @6 type: Never + shouldUseTypeForInitializerInference: false constantInitializer ThrowExpression throwKeyword: throw @10 @@ -17186,6 +17603,7 @@ library topLevelVariables static const c @21 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer ThrowExpression throwKeyword: throw @25 @@ -17214,6 +17632,7 @@ library topLevelVariables static const vNull @6 type: List + shouldUseTypeForInitializerInference: false constantInitializer ListLiteral constKeyword: const @14 @@ -17232,6 +17651,7 @@ library staticType: List static const vDynamic @36 type: List + shouldUseTypeForInitializerInference: false constantInitializer ListLiteral constKeyword: const @47 @@ -17260,6 +17680,7 @@ library staticType: List static const vInterfaceNoTypeParameters @79 type: List + shouldUseTypeForInitializerInference: false constantInitializer ListLiteral constKeyword: const @108 @@ -17288,6 +17709,7 @@ library staticType: List static const vInterfaceNoTypeArguments @136 type: List> + shouldUseTypeForInitializerInference: false constantInitializer ListLiteral constKeyword: const @164 @@ -17306,6 +17728,7 @@ library staticType: List> static const vInterfaceWithTypeArguments @186 type: List> + shouldUseTypeForInitializerInference: false constantInitializer ListLiteral constKeyword: const @216 @@ -17334,6 +17757,7 @@ library staticType: List> static const vInterfaceWithTypeArguments2 @246 type: List>> + shouldUseTypeForInitializerInference: false constantInitializer ListLiteral constKeyword: const @277 @@ -17406,6 +17830,7 @@ library topLevelVariables static const v @23 type: List + shouldUseTypeForInitializerInference: false constantInitializer ListLiteral constKeyword: const @27 @@ -17442,6 +17867,7 @@ library topLevelVariables static const v @28 type: List + shouldUseTypeForInitializerInference: false constantInitializer ListLiteral constKeyword: const @32 @@ -17491,6 +17917,7 @@ library topLevelVariables static const v @32 type: List + shouldUseTypeForInitializerInference: false constantInitializer ListLiteral constKeyword: const @36 @@ -17527,6 +17954,7 @@ library topLevelVariables static const vDynamic1 @6 type: Map + shouldUseTypeForInitializerInference: false constantInitializer SetOrMapLiteral constKeyword: const @18 @@ -17552,6 +17980,7 @@ library staticType: Map static const vDynamic2 @48 type: Map + shouldUseTypeForInitializerInference: false constantInitializer SetOrMapLiteral constKeyword: const @60 @@ -17577,6 +18006,7 @@ library staticType: Map static const vInterface @90 type: Map + shouldUseTypeForInitializerInference: false constantInitializer SetOrMapLiteral constKeyword: const @103 @@ -17602,6 +18032,7 @@ library staticType: Map static const vInterfaceWithTypeArguments @132 type: Map> + shouldUseTypeForInitializerInference: false constantInitializer SetOrMapLiteral constKeyword: const @162 @@ -17659,6 +18090,7 @@ library topLevelVariables static const vDynamic1 @6 type: Set + shouldUseTypeForInitializerInference: false constantInitializer SetOrMapLiteral constKeyword: const @18 @@ -17678,6 +18110,7 @@ library staticType: Set static const vInterface @43 type: Set + shouldUseTypeForInitializerInference: false constantInitializer SetOrMapLiteral constKeyword: const @56 @@ -17697,6 +18130,7 @@ library staticType: Set static const vInterfaceWithTypeArguments @77 type: Set> + shouldUseTypeForInitializerInference: false constantInitializer SetOrMapLiteral constKeyword: const @107 @@ -17744,6 +18178,7 @@ library topLevelVariables static const v @6 type: List + shouldUseTypeForInitializerInference: false constantInitializer ListLiteral constKeyword: const @10 @@ -17776,6 +18211,7 @@ library topLevelVariables static const v @6 type: Map + shouldUseTypeForInitializerInference: false constantInitializer SetOrMapLiteral constKeyword: const @10 @@ -17821,6 +18257,7 @@ library topLevelVariables static const v @6 type: Set + shouldUseTypeForInitializerInference: false constantInitializer SetOrMapLiteral constKeyword: const @10 @@ -17854,6 +18291,7 @@ library topLevelVariables static const v @6 type: Type + shouldUseTypeForInitializerInference: false constantInitializer TypeLiteral type: NamedType @@ -17895,6 +18333,7 @@ library fields static const enumConstant a @8 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -17911,6 +18350,7 @@ library staticType: E static const enumConstant b @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -17927,6 +18367,7 @@ library staticType: E static const enumConstant c @14 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -17975,10 +18416,13 @@ library topLevelVariables static final vValue @23 type: E + shouldUseTypeForInitializerInference: false static final vValues @43 type: List + shouldUseTypeForInitializerInference: false static final vIndex @69 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get vValue @-1 returnType: E @@ -18003,6 +18447,7 @@ library fields static const enumConstant a @8 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -18039,6 +18484,7 @@ library topLevelVariables static final vToString @17 type: String + shouldUseTypeForInitializerInference: false accessors synthetic static get vToString @-1 returnType: String @@ -18060,6 +18506,7 @@ library fields static const a @25 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer SimpleIdentifier token: b @29 @@ -18067,6 +18514,7 @@ library staticType: dynamic static const b @47 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @51 @@ -18096,6 +18544,7 @@ library fields static const a @25 type: dynamic Function() + shouldUseTypeForInitializerInference: false constantInitializer SimpleIdentifier token: m @29 @@ -18197,6 +18646,7 @@ library alias: self::@typeAlias::F typeArguments dynamic + shouldUseTypeForInitializerInference: true constructors const @82 parameters @@ -19038,6 +19488,7 @@ library fields x @27 type: dynamic + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -19052,6 +19503,7 @@ library fields y @48 type: int + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -19132,6 +19584,7 @@ library fields static const enumConstant a @8 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -19148,6 +19601,7 @@ library staticType: E static const enumConstant b @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -19192,6 +19646,7 @@ library fields static const enumConstant c @22 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -19208,6 +19663,7 @@ library staticType: E static const enumConstant d @25 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -19224,6 +19680,7 @@ library staticType: E static const enumConstant e @28 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -19298,6 +19755,7 @@ library fields static x @63 type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: dynamic @@ -19311,6 +19769,7 @@ library fields static y @100 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get y @-1 returnType: int @@ -19405,6 +19864,7 @@ library fields x @27 type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic get x @-1 returnType: dynamic @@ -19419,6 +19879,7 @@ library fields y @48 type: int + shouldUseTypeForInitializerInference: false accessors synthetic get y @-1 returnType: int @@ -19443,12 +19904,16 @@ library topLevelVariables static x @5 type: bool + shouldUseTypeForInitializerInference: true static x @12 type: dynamic + shouldUseTypeForInitializerInference: false static x @19 type: int + shouldUseTypeForInitializerInference: false static x @30 type: double + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: bool @@ -19500,6 +19965,7 @@ library fields static const enumConstant int @14 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -19522,6 +19988,7 @@ library staticType: E static const enumConstant string @22 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -19588,6 +20055,7 @@ library fields static const enumConstant _name @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -19643,6 +20111,7 @@ library fields static const enumConstant v @14 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -19713,6 +20182,7 @@ library fields static const enumConstant _ @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -19765,6 +20235,7 @@ library fields static const enumConstant v @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -19820,6 +20291,7 @@ library fields static const enumConstant v @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -19873,6 +20345,7 @@ library fields static const enumConstant v @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -19901,6 +20374,7 @@ library staticType: List final x @22 type: dynamic + shouldUseTypeForInitializerInference: false constructors const @33 parameters @@ -19938,6 +20412,7 @@ library fields static const enumConstant v @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -19966,8 +20441,10 @@ library staticType: List final x @26 type: int + shouldUseTypeForInitializerInference: true final x @44 type: String + shouldUseTypeForInitializerInference: true constructors const @55 parameters @@ -20002,6 +20479,7 @@ library fields static const enumConstant v @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -20059,6 +20537,7 @@ library fields static const enumConstant v @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -20087,6 +20566,7 @@ library staticType: List final x @26 type: int + shouldUseTypeForInitializerInference: true constructors const @37 parameters @@ -20132,6 +20612,7 @@ library fields static const enumConstant v @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -20160,6 +20641,7 @@ library staticType: List final x @26 type: num + shouldUseTypeForInitializerInference: true constructors const @37 parameters @@ -20193,6 +20675,7 @@ library fields static const enumConstant v @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -20221,6 +20704,7 @@ library staticType: List final x @22 type: dynamic + shouldUseTypeForInitializerInference: false constructors @27 parameters @@ -20254,6 +20738,7 @@ library fields static const enumConstant v @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -20282,6 +20767,7 @@ library staticType: List final x @22 type: dynamic + shouldUseTypeForInitializerInference: false constructors @27 parameters @@ -20314,6 +20800,7 @@ library fields static const enumConstant v @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -20380,6 +20867,7 @@ library fields static const enumConstant v @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -20443,6 +20931,7 @@ library fields static const enumConstant v @14 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -20473,6 +20962,7 @@ library staticType: List> final x @29 type: int + shouldUseTypeForInitializerInference: true constructors const @40 parameters @@ -20532,6 +21022,7 @@ library fields static const enumConstant v @69 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -20584,6 +21075,7 @@ library fields static const enumConstant v @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -20612,6 +21104,7 @@ library staticType: List final foo @22 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 42 @28 @@ -20649,6 +21142,7 @@ library fields final promotable _foo @33 type: int? + shouldUseTypeForInitializerInference: true '''); } @@ -20668,6 +21162,7 @@ library fields static const enumConstant v @10 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -20730,6 +21225,7 @@ library fields static const enumConstant v @35 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -20794,6 +21290,7 @@ library fields static const enumConstant v @44 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -20859,6 +21356,7 @@ library fields static const enumConstant v @52 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -20914,6 +21412,7 @@ library fields static const enumConstant v @14 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -20978,6 +21477,7 @@ library fields static const enumConstant v @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -21035,6 +21535,7 @@ library fields static const enumConstant v @29 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -21095,6 +21596,7 @@ library fields static const enumConstant v @67 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -21160,6 +21662,7 @@ library fields static const enumConstant v @10 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -21221,6 +21724,7 @@ library fields static const enumConstant v @14 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -21281,6 +21785,7 @@ library fields static const enumConstant v @39 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -21555,6 +22060,7 @@ library static const enumConstant a @32 documentationComment: /**\n * aaa\n */ type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -21572,6 +22078,7 @@ library static const enumConstant b @47 documentationComment: /// bbb type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -21647,6 +22154,7 @@ library staticType: null element: self::@getter::annotation type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -21672,6 +22180,7 @@ library staticType: null element: self::@getter::annotation type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -21714,6 +22223,7 @@ library topLevelVariables static const annotation @91 type: int + shouldUseTypeForInitializerInference: true constantInitializer IntegerLiteral literal: 0 @104 @@ -21735,6 +22245,7 @@ library fields static const enumConstant v1 @9 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -21751,6 +22262,7 @@ library staticType: E static const enumConstant v2 @13 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -21804,6 +22316,7 @@ library fields static const enumConstant v1 @10 type: E1 + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -21842,6 +22355,7 @@ library fields static const enumConstant v2 @25 type: E2 + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -21947,6 +22461,7 @@ library fields static const enumConstant a @8 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -21963,6 +22478,7 @@ library staticType: E static const enumConstant b @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -21979,6 +22495,7 @@ library staticType: E static const enumConstant c @14 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -22866,6 +23383,7 @@ library topLevelVariables static a @33 type: int + shouldUseTypeForInitializerInference: true accessors synthetic static get a @-1 returnType: int @@ -22901,6 +23419,7 @@ library topLevelVariables static const a @35 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @39 @@ -22933,6 +23452,7 @@ library fields final f @21 type: dynamic + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -22971,6 +23491,7 @@ library fields static const x @36 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @40 @@ -23708,6 +24229,7 @@ library topLevelVariables static x @35 type: FutureOr + shouldUseTypeForInitializerInference: true accessors synthetic static get x @-1 returnType: FutureOr @@ -23733,6 +24255,7 @@ library topLevelVariables static const x @27 type: Type + shouldUseTypeForInitializerInference: false constantInitializer SimpleIdentifier token: FutureOr @31 @@ -23764,8 +24287,10 @@ library topLevelVariables static x @52 type: FutureOr + shouldUseTypeForInitializerInference: false static y @65 type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: FutureOr @@ -23805,6 +24330,7 @@ library topLevelVariables static f @16 type: void Function() + shouldUseTypeForInitializerInference: true accessors synthetic static get f @-1 returnType: void Function() @@ -23826,6 +24352,7 @@ library topLevelVariables static f @17 type: void Function()? + shouldUseTypeForInitializerInference: true accessors synthetic static get f @-1 returnType: void Function()? @@ -23848,6 +24375,7 @@ library topLevelVariables static f @31 type: void Function()* + shouldUseTypeForInitializerInference: true accessors synthetic static get f @-1 returnType: void Function()* @@ -23989,6 +24517,7 @@ library topLevelVariables static v @30 type: int Function(int, String) + shouldUseTypeForInitializerInference: true accessors synthetic static get v @-1 returnType: int Function(int, String) @@ -24139,6 +24668,7 @@ library base: self::@class::A::@constructor::new substitution: {T: int Function(String)} type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: int @@ -24171,6 +24701,7 @@ library topLevelVariables static const v @35 type: A + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -24253,6 +24784,7 @@ library topLevelVariables static const v @35 type: A + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -24335,6 +24867,7 @@ library topLevelVariables static const v @35 type: A + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -24417,6 +24950,7 @@ library topLevelVariables static const v @35 type: A + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -24814,6 +25348,7 @@ library fields final x @25 type: Object + shouldUseTypeForInitializerInference: true constructors const named @38 periodOffset: 37 @@ -24828,6 +25363,7 @@ library topLevelVariables static const x @61 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -25127,6 +25663,7 @@ library topLevelVariables static f @51 type: Future + shouldUseTypeForInitializerInference: true accessors synthetic static get f @-1 returnType: Future @@ -25183,6 +25720,7 @@ library topLevelVariables static f @52 type: Future + shouldUseTypeForInitializerInference: true accessors synthetic static get f @-1 returnType: Future @@ -25209,6 +25747,7 @@ library topLevelVariables static c @26 type: C + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -25263,8 +25802,10 @@ library topLevelVariables static f @48 type: Future + shouldUseTypeForInitializerInference: true static s @58 type: Stream + shouldUseTypeForInitializerInference: true accessors synthetic static get f @-1 returnType: Future @@ -25316,8 +25857,10 @@ library topLevelVariables static c @36 type: C + shouldUseTypeForInitializerInference: true static d @41 type: D + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -25383,6 +25926,7 @@ library topLevelVariables static const x @118 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @122 @@ -25453,6 +25997,7 @@ library topLevelVariables static const x @101 type: C + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression keyword: const @105 @@ -25521,6 +26066,7 @@ library topLevelVariables static s @74 type: S + shouldUseTypeForInitializerInference: false accessors synthetic static get s @-1 returnType: S @@ -25554,6 +26100,7 @@ library fields b @14 type: B + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -25589,8 +26136,10 @@ library topLevelVariables static a @111 type: A + shouldUseTypeForInitializerInference: false static x @128 type: C + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: A @@ -25622,10 +26171,13 @@ library topLevelVariables static x @4 type: Iterable + shouldUseTypeForInitializerInference: false static y @40 type: List + shouldUseTypeForInitializerInference: false static z @53 type: List + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: Iterable @@ -25667,6 +26219,7 @@ library fields p @16 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -25680,8 +26233,10 @@ library topLevelVariables static x @25 type: List + shouldUseTypeForInitializerInference: false static y @40 type: Iterable + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: List @@ -25742,6 +26297,7 @@ library fields final x @24 type: dynamic + shouldUseTypeForInitializerInference: false constructors @29 accessors @@ -25909,8 +26465,8 @@ library nameEnd: 67 topLevelVariables static c @78 - typeInferenceError: couldNotInfer type: C + shouldUseTypeForInitializerInference: false accessors synthetic static get c @-1 returnType: C @@ -25939,8 +26495,10 @@ library fields static final foo @25 type: int + shouldUseTypeForInitializerInference: false static final bar @56 type: int Function(double) + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -25970,6 +26528,7 @@ library topLevelVariables static x @21 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: int @@ -26003,10 +26562,13 @@ library topLevelVariables static m @19 type: int Function()? + shouldUseTypeForInitializerInference: true static n @53 type: int Function() + shouldUseTypeForInitializerInference: true static x @73 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get m @-1 returnType: int Function()? @@ -26049,8 +26611,8 @@ library definingUnit topLevelVariables static m @30 - typeInferenceError: inferenceFailureOnInstanceCreation type: HashMap + shouldUseTypeForInitializerInference: false accessors synthetic static get m @-1 returnType: HashMap @@ -26077,16 +26639,20 @@ library typeInferenceError: dependencyCycle arguments: [a, b, c] type: dynamic + shouldUseTypeForInitializerInference: false static b @19 typeInferenceError: dependencyCycle arguments: [a, b, c] type: dynamic + shouldUseTypeForInitializerInference: false static c @34 typeInferenceError: dependencyCycle arguments: [a, b, c] type: dynamic + shouldUseTypeForInitializerInference: false static d @49 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: dynamic @@ -26133,6 +26699,7 @@ library v @49 type: int Function(String) alias: self::@typeAlias::F + shouldUseTypeForInitializerInference: true constructors synthetic @-1 superConstructor: self::@class::D::@constructor::new @@ -26182,6 +26749,7 @@ library topLevelVariables static x @21 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: int @@ -26207,6 +26775,7 @@ library topLevelVariables static x @21 type: int? + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: int? @@ -26232,6 +26801,7 @@ library topLevelVariables static x @21 type: void Function() + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: void Function() @@ -26257,6 +26827,7 @@ library topLevelVariables static x @21 type: void Function()? + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: void Function()? @@ -26289,6 +26860,7 @@ library fields v @37 type: Map + shouldUseTypeForInitializerInference: true constructors synthetic @-1 superConstructor: ConstructorMember @@ -26342,6 +26914,7 @@ library topLevelVariables static v @53 type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: dynamic @@ -26500,6 +27073,7 @@ library topLevelVariables static v @40 type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: dynamic @@ -26533,6 +27107,7 @@ library topLevelVariables static v @42 type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: dynamic @@ -26656,8 +27231,10 @@ library topLevelVariables static a1 @36 type: A + shouldUseTypeForInitializerInference: false static a2 @50 type: A + shouldUseTypeForInitializerInference: false accessors synthetic static get a1 @-1 returnType: A @@ -26696,8 +27273,10 @@ library topLevelVariables static a1 @30 type: A + shouldUseTypeForInitializerInference: false static a2 @48 type: A + shouldUseTypeForInitializerInference: false accessors synthetic static get a1 @-1 returnType: A @@ -26730,6 +27309,7 @@ library topLevelVariables static v @71 type: List + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: List @@ -26801,6 +27381,7 @@ library fields f @141 type: dynamic + shouldUseTypeForInitializerInference: false constructors synthetic @-1 superConstructor: self::@class::C::@constructor::new @@ -26823,6 +27404,7 @@ library topLevelVariables static v @4 type: int Function() + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: int Function() @@ -26842,6 +27424,7 @@ library topLevelVariables static v @4 type: Future Function(dynamic) + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: Future Function(dynamic) @@ -26867,6 +27450,7 @@ library topLevelVariables static v @25 type: Future Function(Future>>) + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: Future Function(Future>>) @@ -26891,6 +27475,7 @@ library topLevelVariables static v @25 type: Future Function(Future) + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: Future Function(Future) @@ -26915,6 +27500,7 @@ library topLevelVariables static v @25 type: Future Function(Future) + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: Future Function(Future) @@ -26940,6 +27526,7 @@ library fields v @16 type: int Function() + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -27212,6 +27799,7 @@ library topLevelVariables static c @47 type: C> + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C> @@ -27246,8 +27834,8 @@ library class B @56 fields c3 @66 - typeInferenceError: couldNotInfer type: C> + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -27261,9 +27849,10 @@ library topLevelVariables static c @29 type: C> + shouldUseTypeForInitializerInference: true static c2 @36 - typeInferenceError: couldNotInfer type: C> + shouldUseTypeForInitializerInference: false accessors synthetic static get c @-1 returnType: C> @@ -27306,8 +27895,8 @@ library class B @71 fields c3 @81 - typeInferenceError: couldNotInfer type: C*>* + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -27321,9 +27910,10 @@ library topLevelVariables static c @44 type: C*>* + shouldUseTypeForInitializerInference: true static c2 @51 - typeInferenceError: couldNotInfer type: C*>* + shouldUseTypeForInitializerInference: false accessors synthetic static get c @-1 returnType: C*>* @@ -27364,6 +27954,7 @@ library topLevelVariables static c @47 type: C, num> + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C, num> @@ -27433,6 +28024,7 @@ library alias: self::@typeAlias::F typeArguments num + shouldUseTypeForInitializerInference: true accessors synthetic static get f @-1 returnType: dynamic Function(num) @@ -27479,6 +28071,7 @@ library topLevelVariables static b @69 type: B> + shouldUseTypeForInitializerInference: true accessors synthetic static get b @-1 returnType: B> @@ -27518,6 +28111,7 @@ library alias: self::@typeAlias::F typeArguments num + shouldUseTypeForInitializerInference: true accessors synthetic static get f @-1 returnType: S Function(num) @@ -27554,6 +28148,7 @@ library fields final values @31 type: List> + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -27588,6 +28183,7 @@ library topLevelVariables static c @28 type: C + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -27699,6 +28295,7 @@ library fields v @50 type: List + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -27782,6 +28379,7 @@ library topLevelVariables static V @27 type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get V @-1 returnType: dynamic @@ -27821,6 +28419,7 @@ library fields foo @16 type: int + shouldUseTypeForInitializerInference: true synthetic bar @-1 type: dynamic constructors @@ -28665,6 +29264,7 @@ library topLevelVariables static main @4 type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get main @-1 returnType: dynamic @@ -28884,6 +29484,7 @@ library staticType: null element: self::@getter::a type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -28897,6 +29498,7 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @10 @@ -28945,6 +29547,7 @@ library fields static const foo @54 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 1 @60 @@ -28968,6 +29571,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -29010,12 +29614,14 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 staticType: Null static const b @22 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @26 @@ -29066,6 +29672,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -29934,6 +30541,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -29964,6 +30572,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -29993,6 +30602,7 @@ library staticType: null element: self::@getter::a type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -30029,6 +30639,7 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 42 @10 @@ -30060,6 +30671,7 @@ library fields final value @26 type: dynamic + shouldUseTypeForInitializerInference: true constructors const @41 parameters @@ -30090,6 +30702,7 @@ library rightParenthesis: ) @76 element: self::@class::A::@constructor::new type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -30106,6 +30719,7 @@ library staticType: E static const enumConstant b @83 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -30137,6 +30751,7 @@ library rightParenthesis: ) @94 element: self::@class::A::@constructor::new type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -30209,6 +30824,7 @@ library staticType: null element: self::@enum::E::@getter::v type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -30263,6 +30879,7 @@ library fields static const enumConstant v @25 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -30307,6 +30924,7 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 42 @10 @@ -30335,6 +30953,7 @@ library fields static const enumConstant v @25 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -30382,6 +31001,7 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 42 @10 @@ -30432,6 +31052,7 @@ library fields static const enumConstant v @40 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -30462,6 +31083,7 @@ library staticType: List> static const foo @58 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 1 @64 @@ -30489,6 +31111,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -30526,6 +31149,7 @@ library fields static const enumConstant v @31 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -30564,6 +31188,7 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 42 @10 @@ -30593,6 +31218,7 @@ library fields static const enumConstant v @26 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -30629,6 +31255,7 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 42 @10 @@ -30666,6 +31293,7 @@ library topLevelVariables static const a @28 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @32 @@ -30714,6 +31342,7 @@ library fields static const foo @65 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 1 @71 @@ -30735,6 +31364,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -30783,6 +31413,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -30811,6 +31442,7 @@ library staticType: null element: self::@getter::a type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -30824,6 +31456,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -30850,6 +31483,7 @@ library fields x @32 type: dynamic + shouldUseTypeForInitializerInference: false constructors @37 parameters @@ -30875,6 +31509,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -30896,6 +31531,7 @@ library fields x @30 type: dynamic + shouldUseTypeForInitializerInference: false constructors @33 parameters @@ -30925,6 +31561,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -30947,6 +31584,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -30976,6 +31614,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -31006,6 +31645,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -31052,6 +31692,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -31070,6 +31711,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -31102,6 +31744,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -31163,12 +31806,14 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 staticType: Null static const b @22 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @26 @@ -31211,6 +31856,7 @@ library topLevelVariables static const a @29 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @33 @@ -31254,6 +31900,7 @@ library topLevelVariables static const a @42 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @46 @@ -31291,6 +31938,7 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 42 @10 @@ -31331,6 +31979,7 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 42 @10 @@ -31370,6 +32019,7 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 42 @10 @@ -31478,6 +32128,7 @@ library topLevelVariables static const a @20 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @24 @@ -31515,6 +32166,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -31563,12 +32215,14 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 staticType: Null static const b @22 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @26 @@ -31619,12 +32273,14 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 staticType: Null static const b @22 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @26 @@ -31672,6 +32328,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -31722,6 +32379,7 @@ library fields static const foo @54 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 1 @60 @@ -31743,6 +32401,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -31785,12 +32444,14 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 staticType: Null static const b @22 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @26 @@ -31839,6 +32500,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -31887,6 +32549,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -31930,6 +32593,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -31991,6 +32655,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -32045,6 +32710,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -32112,6 +32778,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -32158,6 +32825,7 @@ library staticType: null element: self::@getter::foo type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -32174,6 +32842,7 @@ library staticType: E static const enumConstant e2 @43 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -32198,6 +32867,7 @@ library staticType: null element: self::@getter::foo type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -32246,6 +32916,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -32290,6 +32961,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -32331,6 +33003,7 @@ library staticType: null element: self::@getter::foo type: int + shouldUseTypeForInitializerInference: false static const isStaticConst @79 metadata Annotation @@ -32341,6 +33014,7 @@ library staticType: null element: self::@getter::foo type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 2 @95 @@ -32355,6 +33029,7 @@ library staticType: null element: self::@getter::foo type: int + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -32377,6 +33052,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -32412,6 +33088,7 @@ library topLevelVariables static const foo @52 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @58 @@ -32458,6 +33135,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -32516,6 +33194,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -32584,6 +33263,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -32622,6 +33302,7 @@ library topLevelVariables static const foo @65 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @71 @@ -32664,6 +33345,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -32723,6 +33405,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -32758,6 +33441,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -32807,6 +33491,7 @@ library topLevelVariables static const foo @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @12 @@ -32821,6 +33506,7 @@ library staticType: null element: self::@getter::foo type: int + shouldUseTypeForInitializerInference: false static const isConst @53 metadata Annotation @@ -32831,6 +33517,7 @@ library staticType: null element: self::@getter::foo type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 2 @63 @@ -32865,6 +33552,7 @@ library topLevelVariables static const a @37 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @41 @@ -32941,6 +33629,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -32997,6 +33686,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -33019,6 +33709,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -33052,6 +33743,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -33122,6 +33814,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -33140,6 +33833,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -33154,6 +33848,7 @@ library staticType: null element: self::@getter::a type: int + shouldUseTypeForInitializerInference: true accessors synthetic static get a @-1 returnType: dynamic @@ -33190,6 +33885,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -33244,6 +33940,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -33262,6 +33959,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -33309,6 +34007,7 @@ library topLevelVariables static const a @6 type: dynamic + shouldUseTypeForInitializerInference: false constantInitializer NullLiteral literal: null @10 @@ -33336,6 +34035,7 @@ library topLevelVariables static const a @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @10 @@ -33350,6 +34050,7 @@ library staticType: null element: self::@getter::a type: int + shouldUseTypeForInitializerInference: true accessors synthetic static get a @-1 returnType: int @@ -33379,6 +34080,7 @@ library fields static const x @25 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @29 @@ -33445,6 +34147,7 @@ library fields static const enumConstant a @8 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -33461,6 +34164,7 @@ library staticType: E static const enumConstant b @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -33477,6 +34181,7 @@ library staticType: E static const enumConstant c @14 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -33562,6 +34267,7 @@ library fields static const x @36 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @40 @@ -33640,6 +34346,7 @@ library fields a @50 type: A + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -33653,6 +34360,7 @@ library topLevelVariables static c @59 type: double + shouldUseTypeForInitializerInference: false accessors synthetic static get c @-1 returnType: double @@ -33711,6 +34419,7 @@ library fields f @101 type: T + shouldUseTypeForInitializerInference: true synthetic g @-1 type: U synthetic s @-1 @@ -33768,6 +34477,7 @@ library fields final x @18 type: int + shouldUseTypeForInitializerInference: false accessors synthetic get x @-1 returnType: int @@ -34602,6 +35312,7 @@ library topLevelVariables static v @19 type: C + shouldUseTypeForInitializerInference: true accessors synthetic static get v @-1 returnType: C @@ -34632,6 +35343,7 @@ library topLevelVariables static v @19 type: C + shouldUseTypeForInitializerInference: true accessors synthetic static get v @-1 returnType: C @@ -34666,6 +35378,7 @@ library topLevelVariables static v @19 type: C + shouldUseTypeForInitializerInference: true accessors synthetic static get v @-1 returnType: C @@ -34698,6 +35411,7 @@ library topLevelVariables static v @36 type: A + shouldUseTypeForInitializerInference: true accessors synthetic static get v @-1 returnType: A @@ -34762,6 +35476,7 @@ library fields foo @16 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -35250,6 +35965,7 @@ library fields foo @16 type: int + shouldUseTypeForInitializerInference: true nonSynthetic: self::@class::C::@field::foo constructors synthetic @-1 @@ -35340,6 +36056,7 @@ library fields static const enumConstant a @11 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -35357,6 +36074,7 @@ library nonSynthetic: self::@enum::E::@field::a static const enumConstant b @14 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -35474,6 +36192,7 @@ library fields foo @16 type: int + shouldUseTypeForInitializerInference: true nonSynthetic: self::@mixin::M::@field::foo accessors synthetic get foo @-1 @@ -35623,6 +36342,7 @@ library topLevelVariables static foo @4 type: int + shouldUseTypeForInitializerInference: true nonSynthetic: self::@variable::foo accessors synthetic static get foo @-1 @@ -35961,6 +36681,7 @@ library fields x @16 type: dynamic + shouldUseTypeForInitializerInference: false constructors positional @23 periodOffset: 22 @@ -36096,6 +36817,7 @@ library fields final x @32 type: (int, String) + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -36118,6 +36840,7 @@ library fields final x @18 type: (int, bool) + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -36362,6 +37085,7 @@ library topLevelVariables static final x @20 type: (int, String) + shouldUseTypeForInitializerInference: true accessors synthetic static get x @-1 returnType: (int, String) @@ -36378,6 +37102,7 @@ library topLevelVariables static final x @6 type: (int, bool) + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: (int, bool) @@ -36477,6 +37202,7 @@ library topLevelVariables static final v @6 type: int Function(T) + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: int Function(T) @@ -36527,6 +37253,7 @@ library fields v @22 type: int Function(T, U) + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -36575,6 +37302,7 @@ library topLevelVariables static final v @6 type: int Function() + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: int Function() @@ -36595,6 +37323,7 @@ library topLevelVariables static final v @6 type: int Function(int, String) + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: int Function(int, String) @@ -36614,6 +37343,7 @@ library topLevelVariables static i @13 type: int + shouldUseTypeForInitializerInference: true accessors synthetic static get i @-1 returnType: int @@ -36633,6 +37363,7 @@ library topLevelVariables static m @22 type: Map + shouldUseTypeForInitializerInference: true accessors synthetic static get m @-1 returnType: Map @@ -36652,6 +37383,7 @@ library topLevelVariables static m @18 type: Map + shouldUseTypeForInitializerInference: true accessors synthetic static get m @-1 returnType: Map @@ -36671,6 +37403,7 @@ library topLevelVariables static m @21 type: Map + shouldUseTypeForInitializerInference: true accessors synthetic static get m @-1 returnType: Map @@ -36690,6 +37423,7 @@ library topLevelVariables static m @17 type: Map + shouldUseTypeForInitializerInference: true accessors synthetic static get m @-1 returnType: Map @@ -36709,6 +37443,7 @@ library topLevelVariables static m @4 type: Map + shouldUseTypeForInitializerInference: true accessors synthetic static get m @-1 returnType: Map @@ -36728,6 +37463,7 @@ library topLevelVariables static d @8 type: dynamic + shouldUseTypeForInitializerInference: true accessors synthetic static get d @-1 returnType: dynamic @@ -36753,8 +37489,10 @@ library topLevelVariables static a @4 type: int Function() + shouldUseTypeForInitializerInference: false static b @42 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: int Function() @@ -36787,6 +37525,7 @@ library topLevelVariables static x @35 type: Future Function() + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: Future Function() @@ -36817,6 +37556,7 @@ library topLevelVariables static final v @38 type: int* + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: int* @@ -36833,6 +37573,7 @@ library topLevelVariables static x @4 type: int Function(int Function(String)) + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: int Function(int Function(String)) @@ -36854,6 +37595,7 @@ library topLevelVariables static x @4 type: int Function(int Function(String)) + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: int Function(int Function(String)) @@ -36880,6 +37622,7 @@ library topLevelVariables static y @21 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get y @-1 returnType: int @@ -36908,10 +37651,12 @@ library typeInferenceError: dependencyCycle arguments: [x, y] type: dynamic + shouldUseTypeForInitializerInference: false static final y @51 typeInferenceError: dependencyCycle arguments: [x, y] type: dynamic + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -36940,12 +37685,15 @@ library typeInferenceError: dependencyCycle arguments: [a, c] type: dynamic + shouldUseTypeForInitializerInference: false static final b @49 type: A + shouldUseTypeForInitializerInference: false final c @66 typeInferenceError: dependencyCycle arguments: [a, c] type: dynamic + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -36981,6 +37729,7 @@ library fields value @17 type: T + shouldUseTypeForInitializerInference: true constructors @27 parameters @@ -36999,6 +37748,7 @@ library fields a @61 type: A + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -37039,6 +37789,7 @@ library fields value @17 type: T + shouldUseTypeForInitializerInference: true constructors @27 parameters @@ -37084,6 +37835,7 @@ library fields a @88 type: B + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -37119,6 +37871,7 @@ library fields f @19 type: int + shouldUseTypeForInitializerInference: false constructors @28 parameters @@ -37159,10 +37912,12 @@ library typeInferenceError: dependencyCycle arguments: [a, b] type: dynamic + shouldUseTypeForInitializerInference: false static final b @48 typeInferenceError: dependencyCycle arguments: [a, b] type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: dynamic @@ -37188,6 +37943,7 @@ library topLevelVariables static v @38 type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: dynamic @@ -37209,6 +37965,7 @@ library topLevelVariables static x @4 type: dynamic Function(dynamic) Function(dynamic) + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: dynamic Function(dynamic) Function(dynamic) @@ -37230,6 +37987,7 @@ library topLevelVariables static x @4 type: int Function(int) Function(int) + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: int Function(int) Function(int) @@ -37251,6 +38009,7 @@ library topLevelVariables static x @4 type: dynamic Function([dynamic]) + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: dynamic Function([dynamic]) @@ -37275,14 +38034,17 @@ library topLevelVariables static final a @6 type: dynamic + shouldUseTypeForInitializerInference: false static final b @19 typeInferenceError: dependencyCycle arguments: [b, c] type: dynamic + shouldUseTypeForInitializerInference: false static final c @32 typeInferenceError: dependencyCycle arguments: [b, c] type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: dynamic @@ -37308,12 +38070,15 @@ library typeInferenceError: dependencyCycle arguments: [a, b] type: dynamic + shouldUseTypeForInitializerInference: false static final b @19 typeInferenceError: dependencyCycle arguments: [a, b] type: dynamic + shouldUseTypeForInitializerInference: false static final c @32 type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: dynamic @@ -37341,18 +38106,22 @@ library typeInferenceError: dependencyCycle arguments: [a, d] type: dynamic + shouldUseTypeForInitializerInference: false static final b @23 typeInferenceError: dependencyCycle arguments: [b, c] type: dynamic + shouldUseTypeForInitializerInference: false static final c @36 typeInferenceError: dependencyCycle arguments: [b, c] type: dynamic + shouldUseTypeForInitializerInference: false static final d @49 typeInferenceError: dependencyCycle arguments: [a, d] type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: dynamic @@ -37386,14 +38155,17 @@ library typeInferenceError: dependencyCycle arguments: [a, b] type: dynamic + shouldUseTypeForInitializerInference: false static final b @19 typeInferenceError: dependencyCycle arguments: [b, c] type: dynamic + shouldUseTypeForInitializerInference: false static final c @36 typeInferenceError: dependencyCycle arguments: [b, c] type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: dynamic @@ -37438,6 +38210,7 @@ library fields final f @67 type: T + shouldUseTypeForInitializerInference: true constructors const @78 parameters @@ -37450,8 +38223,10 @@ library topLevelVariables static final b @98 type: B + shouldUseTypeForInitializerInference: false static final c @113 type: C + shouldUseTypeForInitializerInference: false accessors synthetic static get b @-1 returnType: B @@ -37482,6 +38257,7 @@ library topLevelVariables static v @48 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: int @@ -37523,8 +38299,10 @@ library topLevelVariables static V2 @56 type: dynamic + shouldUseTypeForInitializerInference: true static V @71 type: int + shouldUseTypeForInitializerInference: true accessors synthetic static get V2 @-1 returnType: dynamic @@ -37560,8 +38338,10 @@ library topLevelVariables static V @4 type: dynamic + shouldUseTypeForInitializerInference: false static V2 @22 type: List + shouldUseTypeForInitializerInference: true accessors synthetic static get V @-1 returnType: dynamic @@ -37615,6 +38395,7 @@ library topLevelVariables static v @4 type: dynamic + shouldUseTypeForInitializerInference: true accessors synthetic static get v @-1 returnType: dynamic @@ -37637,6 +38418,7 @@ library topLevelVariables static d @21 type: Null* + shouldUseTypeForInitializerInference: true accessors synthetic static get d @-1 returnType: Null* @@ -37656,6 +38438,7 @@ library topLevelVariables static d @6 type: Never + shouldUseTypeForInitializerInference: true accessors synthetic static get d @-1 returnType: Never @@ -37684,6 +38467,7 @@ library fields t @17 type: T + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -37714,6 +38498,7 @@ library fields t @18 type: T? + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -37745,6 +38530,7 @@ library fields t @32 type: T* + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -37779,6 +38565,7 @@ library fields static const enumConstant v @20 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -37820,11 +38607,14 @@ library topLevelVariables static c @39 type: C + shouldUseTypeForInitializerInference: true static e @44 type: E + shouldUseTypeForInitializerInference: true static f @49 type: dynamic Function() alias: self::@typeAlias::F + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -37865,11 +38655,14 @@ library topLevelVariables static c @28 type: C + shouldUseTypeForInitializerInference: true static e @33 type: E + shouldUseTypeForInitializerInference: true static f @38 type: dynamic Function() alias: self::@typeAlias::F + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -37906,6 +38699,7 @@ library fields static const enumConstant v @31 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -37966,6 +38760,7 @@ library fields static const enumConstant v @46 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -38009,11 +38804,14 @@ library topLevelVariables static c @13 type: C + shouldUseTypeForInitializerInference: true static e @18 type: E + shouldUseTypeForInitializerInference: true static f @23 type: dynamic Function() alias: self::@typeAlias::F + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -38064,6 +38862,7 @@ library fields static const enumConstant v @31 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -38106,11 +38905,14 @@ library topLevelVariables static c @13 type: C + shouldUseTypeForInitializerInference: true static e @18 type: E + shouldUseTypeForInitializerInference: true static f @23 type: dynamic Function() alias: self::@typeAlias::F + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -38159,6 +38961,7 @@ library fields static const enumConstant v @31 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -38200,11 +39003,14 @@ library topLevelVariables static c @50 type: C + shouldUseTypeForInitializerInference: true static e @55 type: E + shouldUseTypeForInitializerInference: true static f @60 type: dynamic Function() alias: self::@typeAlias::F + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -38244,6 +39050,7 @@ library topLevelVariables static c @13 type: C + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -38272,6 +39079,7 @@ library topLevelVariables static c @32 type: C + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -38300,6 +39108,7 @@ library topLevelVariables static c @19 type: C + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -38322,6 +39131,7 @@ library fields static const enumConstant v @9 type: E + shouldUseTypeForInitializerInference: false constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -38358,6 +39168,7 @@ library topLevelVariables static e @15 type: E + shouldUseTypeForInitializerInference: true accessors synthetic static get e @-1 returnType: E @@ -38381,11 +39192,14 @@ library topLevelVariables static c @19 type: C + shouldUseTypeForInitializerInference: true static e @24 type: E + shouldUseTypeForInitializerInference: true static f @29 type: dynamic Function() alias: package:test/a.dart::@typeAlias::F + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -38426,11 +39240,14 @@ library topLevelVariables static c @19 type: C + shouldUseTypeForInitializerInference: true static e @24 type: E + shouldUseTypeForInitializerInference: true static f @29 type: dynamic Function() alias: package:test/b.dart::@typeAlias::F + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -38472,11 +39289,14 @@ library topLevelVariables static c @19 type: C + shouldUseTypeForInitializerInference: true static e @24 type: E + shouldUseTypeForInitializerInference: true static f @29 type: dynamic Function() alias: package:test/c.dart::@typeAlias::F + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -38518,11 +39338,14 @@ library topLevelVariables static c @21 type: C + shouldUseTypeForInitializerInference: true static e @26 type: E + shouldUseTypeForInitializerInference: true static f @31 type: dynamic Function() alias: package:test/a/c/c.dart::@typeAlias::F + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -38563,11 +39386,14 @@ library topLevelVariables static c @21 type: C + shouldUseTypeForInitializerInference: true static e @26 type: E + shouldUseTypeForInitializerInference: true static f @31 type: dynamic Function() alias: package:test/a/b/b.dart::@typeAlias::F + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -38608,11 +39434,14 @@ library topLevelVariables static c @19 type: C + shouldUseTypeForInitializerInference: true static e @24 type: E + shouldUseTypeForInitializerInference: true static f @29 type: dynamic Function() alias: package:test/a.dart::@typeAlias::F + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -38654,8 +39483,10 @@ library topLevelVariables static c1 @20 type: C1 + shouldUseTypeForInitializerInference: true static c2 @27 type: C2 + shouldUseTypeForInitializerInference: true accessors synthetic static get c1 @-1 returnType: C1 @@ -38687,11 +39518,14 @@ library topLevelVariables static c @21 type: C + shouldUseTypeForInitializerInference: true static e @26 type: E + shouldUseTypeForInitializerInference: true static f @31 type: dynamic Function() alias: package:test/a/b.dart::@typeAlias::F + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -38731,11 +39565,14 @@ library topLevelVariables static c @19 type: C + shouldUseTypeForInitializerInference: true static e @24 type: E + shouldUseTypeForInitializerInference: true static f @29 type: dynamic Function() alias: package:test/a.dart::@typeAlias::F + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: C @@ -38777,6 +39614,7 @@ library static f @15 type: dynamic Function() alias: self::@typeAlias::F + shouldUseTypeForInitializerInference: true accessors synthetic static get f @-1 returnType: dynamic Function() @@ -38816,6 +39654,7 @@ library typeArguments int String + shouldUseTypeForInitializerInference: true accessors synthetic static get f @-1 returnType: String Function(int) @@ -38860,6 +39699,7 @@ library typeArguments dynamic dynamic + shouldUseTypeForInitializerInference: true accessors synthetic static get f @-1 returnType: dynamic Function(dynamic) @@ -38887,6 +39727,7 @@ library topLevelVariables static c @2 type: dynamic + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: dynamic @@ -38909,6 +39750,7 @@ library topLevelVariables static c @35 type: dynamic + shouldUseTypeForInitializerInference: true accessors synthetic static get c @-1 returnType: dynamic @@ -39435,6 +40277,7 @@ library alias: self::@typeAlias::Foo typeArguments int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -41168,6 +42011,7 @@ library topLevelVariables static foo @4 type: int + shouldUseTypeForInitializerInference: true id: variable_0 getter: getter_0 setter: setter_0 @@ -41206,6 +42050,7 @@ library topLevelVariables static foo @4 type: int + shouldUseTypeForInitializerInference: true id: variable_0 getter: getter_0 setter: setter_0 @@ -41247,6 +42092,7 @@ library topLevelVariables static final foo @10 type: int + shouldUseTypeForInitializerInference: true id: variable_0 getter: getter_0 setter: setter_0 @@ -41775,8 +42621,10 @@ library topLevelVariables static c @36 type: C + shouldUseTypeForInitializerInference: true static v @43 type: void Function() + shouldUseTypeForInitializerInference: false accessors synthetic static get c @-1 returnType: C @@ -41803,6 +42651,7 @@ library topLevelVariables static x @4 type: int + shouldUseTypeForInitializerInference: true accessors synthetic static get x @-1 returnType: int @@ -41822,6 +42671,7 @@ library topLevelVariables static const i @10 type: int + shouldUseTypeForInitializerInference: true constantInitializer IntegerLiteral literal: 0 @14 @@ -41840,6 +42690,7 @@ library topLevelVariables static late const i @15 type: int + shouldUseTypeForInitializerInference: true constantInitializer IntegerLiteral literal: 0 @19 @@ -41864,6 +42715,7 @@ library static x @64 documentationComment: /**\n * Docs\n */ type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: dynamic @@ -41883,6 +42735,7 @@ library topLevelVariables static final x @10 type: int + shouldUseTypeForInitializerInference: true accessors synthetic static get x @-1 returnType: int @@ -42013,6 +42866,7 @@ library topLevelVariables static x @4 type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: dynamic @@ -42024,25 +42878,6 @@ library '''); } - test_variable_inferred_type_implicit_initialized() async { - var library = await buildLibrary('var v = 0;'); - checkElementText(library, r''' -library - definingUnit - topLevelVariables - static v @4 - type: int - accessors - synthetic static get v @-1 - returnType: int - synthetic static set v @-1 - parameters - requiredPositional _v @-1 - type: int - returnType: void -'''); - } - test_variable_initializer() async { var library = await buildLibrary('int v = 0;'); checkElementText(library, r''' @@ -42051,6 +42886,7 @@ library topLevelVariables static v @4 type: int + shouldUseTypeForInitializerInference: true accessors synthetic static get v @-1 returnType: int @@ -42070,6 +42906,7 @@ library topLevelVariables static final v @10 type: int + shouldUseTypeForInitializerInference: true accessors synthetic static get v @-1 returnType: int @@ -42084,6 +42921,7 @@ library topLevelVariables static final v @6 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: int @@ -42100,6 +42938,7 @@ library topLevelVariables static const x @6 type: (int, bool) + shouldUseTypeForInitializerInference: false constantInitializer RecordLiteral leftParenthesis: ( @10 @@ -42142,6 +42981,7 @@ library topLevelVariables static x @59 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: int @@ -42161,6 +43001,7 @@ library topLevelVariables static v @4 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: int @@ -42180,6 +43021,7 @@ library topLevelVariables static late x @9 type: int + shouldUseTypeForInitializerInference: true accessors synthetic static get x @-1 returnType: int @@ -42199,6 +43041,7 @@ library topLevelVariables static late final x @15 type: int + shouldUseTypeForInitializerInference: true accessors synthetic static get x @-1 returnType: int @@ -42218,6 +43061,7 @@ library topLevelVariables static late final x @15 type: int + shouldUseTypeForInitializerInference: true accessors synthetic static get x @-1 returnType: int @@ -42232,6 +43076,7 @@ library topLevelVariables static const i @6 type: int + shouldUseTypeForInitializerInference: false constantInitializer IntegerLiteral literal: 0 @10 @@ -42253,6 +43098,7 @@ library topLevelVariables static final b @23 type: double + shouldUseTypeForInitializerInference: false accessors synthetic static get b @-1 returnType: double @@ -42271,6 +43117,7 @@ library topLevelVariables static final b @34 type: double + shouldUseTypeForInitializerInference: false accessors synthetic static get b @-1 returnType: double @@ -42279,6 +43126,7 @@ library topLevelVariables static final a @19 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: int @@ -42293,6 +43141,7 @@ library topLevelVariables static final i @6 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get i @-1 returnType: int @@ -42312,6 +43161,7 @@ library topLevelVariables static final x @23 type: C + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: C @@ -42350,6 +43200,26 @@ library '''); } + test_variable_type_inferred() async { + var library = await buildLibrary('var v = 0;'); + checkElementText(library, r''' +library + definingUnit + topLevelVariables + static v @4 + type: int + shouldUseTypeForInitializerInference: false + accessors + synthetic static get v @-1 + returnType: int + synthetic static set v @-1 + parameters + requiredPositional _v @-1 + type: int + returnType: void +'''); + } + test_variable_type_inferred_Never() async { var library = await buildLibrary(r''' var a = throw 42; @@ -42361,6 +43231,7 @@ library topLevelVariables static a @4 type: Never + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: Never @@ -42383,6 +43254,7 @@ library topLevelVariables static a @4 type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: dynamic @@ -42413,6 +43285,7 @@ library topLevelVariables static b @21 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get b @-1 returnType: int @@ -42444,6 +43317,7 @@ library topLevelVariables static const a @41 type: A + shouldUseTypeForInitializerInference: true constantInitializer InstanceCreationExpression constructorName: ConstructorName @@ -42474,8 +43348,10 @@ library topLevelVariables static i @4 type: int + shouldUseTypeForInitializerInference: true static j @11 type: int + shouldUseTypeForInitializerInference: true accessors synthetic static get i @-1 returnType: int diff --git a/pkg/analyzer/test/src/summary/macro_test.dart b/pkg/analyzer/test/src/summary/macro_test.dart index 05b0ed6b7f4e..898261121f78 100644 --- a/pkg/analyzer/test/src/summary/macro_test.dart +++ b/pkg/analyzer/test/src/summary/macro_test.dart @@ -962,6 +962,7 @@ library fields foo @-1 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -1187,6 +1188,7 @@ library topLevelVariables static final x @-1 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: int diff --git a/pkg/analyzer/test/src/summary/top_level_inference_test.dart b/pkg/analyzer/test/src/summary/top_level_inference_test.dart index 074b6e1fa7ce..1c77ca78354a 100644 --- a/pkg/analyzer/test/src/summary/top_level_inference_test.dart +++ b/pkg/analyzer/test/src/summary/top_level_inference_test.dart @@ -378,20 +378,28 @@ library topLevelVariables static vPlusIntInt @4 type: int + shouldUseTypeForInitializerInference: false static vPlusIntDouble @29 type: double + shouldUseTypeForInitializerInference: false static vPlusDoubleInt @59 type: double + shouldUseTypeForInitializerInference: false static vPlusDoubleDouble @89 type: double + shouldUseTypeForInitializerInference: false static vMinusIntInt @124 type: int + shouldUseTypeForInitializerInference: false static vMinusIntDouble @150 type: double + shouldUseTypeForInitializerInference: false static vMinusDoubleInt @181 type: double + shouldUseTypeForInitializerInference: false static vMinusDoubleDouble @212 type: double + shouldUseTypeForInitializerInference: false accessors synthetic static get vPlusIntInt @-1 returnType: int @@ -462,6 +470,7 @@ library topLevelVariables static V @4 type: num + shouldUseTypeForInitializerInference: false accessors synthetic static get V @-1 returnType: num @@ -485,10 +494,13 @@ library topLevelVariables static a @4 type: int + shouldUseTypeForInitializerInference: false static t1 @15 type: int + shouldUseTypeForInitializerInference: false static t2 @33 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: int @@ -526,10 +538,13 @@ library topLevelVariables static a @4 type: List + shouldUseTypeForInitializerInference: false static t1 @17 type: int + shouldUseTypeForInitializerInference: false static t2 @38 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: List @@ -572,6 +587,7 @@ library fields f @16 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -585,10 +601,13 @@ library topLevelVariables static a @25 type: A + shouldUseTypeForInitializerInference: false static t1 @42 type: int + shouldUseTypeForInitializerInference: false static t2 @62 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: A @@ -632,6 +651,7 @@ library fields f @16 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -650,10 +670,13 @@ library topLevelVariables static c @56 type: C + shouldUseTypeForInitializerInference: true static t1 @63 type: int + shouldUseTypeForInitializerInference: false static t2 @83 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get c @-1 returnType: C @@ -697,6 +720,7 @@ library fields f @16 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -715,8 +739,10 @@ library topLevelVariables static t1 @76 type: int + shouldUseTypeForInitializerInference: false static t2 @101 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get t1 @-1 returnType: int @@ -754,8 +780,10 @@ library topLevelVariables static uValue @80 type: Future Function() + shouldUseTypeForInitializerInference: false static uFuture @121 type: Future Function() + shouldUseTypeForInitializerInference: false accessors synthetic static get uValue @-1 returnType: Future Function() @@ -793,14 +821,19 @@ library topLevelVariables static vBitXor @4 type: int + shouldUseTypeForInitializerInference: false static vBitAnd @25 type: int + shouldUseTypeForInitializerInference: false static vBitOr @46 type: int + shouldUseTypeForInitializerInference: false static vBitShiftLeft @66 type: int + shouldUseTypeForInitializerInference: false static vBitShiftRight @94 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get vBitXor @-1 returnType: int @@ -858,6 +891,7 @@ library fields a @16 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -874,10 +908,13 @@ library topLevelVariables static vSetField @39 type: A + shouldUseTypeForInitializerInference: false static vInvokeMethod @71 type: A + shouldUseTypeForInitializerInference: false static vBoth @105 type: A + shouldUseTypeForInitializerInference: false accessors synthetic static get vSetField @-1 returnType: A @@ -944,6 +981,7 @@ library fields f @16 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -958,6 +996,7 @@ library fields a @39 type: A + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -972,6 +1011,7 @@ library fields b @58 type: B + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -986,28 +1026,40 @@ library fields a @77 type: A + shouldUseTypeForInitializerInference: true b @94 type: B + shouldUseTypeForInitializerInference: true c @111 type: C + shouldUseTypeForInitializerInference: true t01 @130 type: int + shouldUseTypeForInitializerInference: false t02 @147 type: int + shouldUseTypeForInitializerInference: false t03 @166 type: int + shouldUseTypeForInitializerInference: false t11 @187 type: int + shouldUseTypeForInitializerInference: false t12 @210 type: int + shouldUseTypeForInitializerInference: false t13 @235 type: int + shouldUseTypeForInitializerInference: false t21 @262 type: int + shouldUseTypeForInitializerInference: false t22 @284 type: int + shouldUseTypeForInitializerInference: false t23 @308 type: int + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -1115,6 +1167,7 @@ library topLevelVariables static V @4 type: num + shouldUseTypeForInitializerInference: false accessors synthetic static get V @-1 returnType: num @@ -1137,8 +1190,10 @@ library topLevelVariables static vEq @4 type: bool + shouldUseTypeForInitializerInference: false static vNotEq @22 type: bool + shouldUseTypeForInitializerInference: false accessors synthetic static get vEq @-1 returnType: bool @@ -1170,10 +1225,12 @@ library typeInferenceError: dependencyCycle arguments: [a, b] type: dynamic + shouldUseTypeForInitializerInference: false static b @21 typeInferenceError: dependencyCycle arguments: [a, b] type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: dynamic @@ -1204,6 +1261,7 @@ library typeInferenceError: dependencyCycle arguments: [a] type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: dynamic @@ -1227,10 +1285,13 @@ library topLevelVariables static a @4 type: List + shouldUseTypeForInitializerInference: false static b0 @22 type: num + shouldUseTypeForInitializerInference: false static b1 @37 type: num + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: List @@ -1274,6 +1335,7 @@ library topLevelVariables static x @21 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: int @@ -1300,6 +1362,7 @@ library fields f @16 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -1313,6 +1376,7 @@ library topLevelVariables static x @29 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: int @@ -1343,6 +1407,7 @@ library topLevelVariables static x @21 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: int @@ -1372,6 +1437,7 @@ library topLevelVariables static x @21 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: int @@ -1398,6 +1464,7 @@ library fields f @16 type: int + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -1411,6 +1478,7 @@ library topLevelVariables static x @29 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: int @@ -1441,6 +1509,7 @@ library topLevelVariables static x @21 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: int @@ -1469,6 +1538,7 @@ library fields f @16 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -1483,6 +1553,7 @@ library fields static t @44 type: int + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -1512,6 +1583,7 @@ library fields b @17 type: bool + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -1525,8 +1597,10 @@ library topLevelVariables static c @24 type: C + shouldUseTypeForInitializerInference: true static x @31 type: bool + shouldUseTypeForInitializerInference: false accessors synthetic static get c @-1 returnType: C @@ -1562,6 +1636,7 @@ library fields b @17 type: bool + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -1580,8 +1655,10 @@ library topLevelVariables static c @57 type: C + shouldUseTypeForInitializerInference: true static x @64 type: bool + shouldUseTypeForInitializerInference: false accessors synthetic static get c @-1 returnType: C @@ -1617,6 +1694,7 @@ library fields b @17 type: bool + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -1635,6 +1713,7 @@ library topLevelVariables static x @74 type: bool + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: bool @@ -1681,8 +1760,10 @@ library topLevelVariables static x @70 type: int + shouldUseTypeForInitializerInference: false static y @89 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: int @@ -1719,16 +1800,22 @@ library topLevelVariables static vFuture @25 type: Future + shouldUseTypeForInitializerInference: false static v_noParameters_inferredReturnType @60 type: int Function() + shouldUseTypeForInitializerInference: false static v_hasParameter_withType_inferredReturnType @110 type: int Function(String) + shouldUseTypeForInitializerInference: false static v_hasParameter_withType_returnParameter @177 type: String Function(String) + shouldUseTypeForInitializerInference: false static v_async_returnValue @240 type: Future Function() + shouldUseTypeForInitializerInference: false static v_async_returnFuture @282 type: Future Function() + shouldUseTypeForInitializerInference: false accessors synthetic static get vFuture @-1 returnType: Future @@ -1786,6 +1873,7 @@ library topLevelVariables static v @4 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get v @-1 returnType: int @@ -1809,8 +1897,10 @@ library topLevelVariables static vHasTypeArgument @22 type: int + shouldUseTypeForInitializerInference: false static vNoTypeArgument @55 type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get vHasTypeArgument @-1 returnType: int @@ -1846,8 +1936,10 @@ library topLevelVariables static vOkArgumentType @29 type: String + shouldUseTypeForInitializerInference: false static vWrongArgumentType @57 type: String + shouldUseTypeForInitializerInference: false accessors synthetic static get vOkArgumentType @-1 returnType: String @@ -1900,6 +1992,7 @@ library fields static staticClassVariable @118 type: int + shouldUseTypeForInitializerInference: false synthetic static staticGetter @-1 type: int constructors @@ -1928,22 +2021,31 @@ library topLevelVariables static topLevelVariable @44 type: int + shouldUseTypeForInitializerInference: false static r_topLevelFunction @280 type: String Function(int) + shouldUseTypeForInitializerInference: false static r_topLevelVariable @323 type: int + shouldUseTypeForInitializerInference: false static r_topLevelGetter @366 type: int + shouldUseTypeForInitializerInference: false static r_staticClassVariable @405 type: int + shouldUseTypeForInitializerInference: false static r_staticGetter @456 type: int + shouldUseTypeForInitializerInference: false static r_staticClassMethod @493 type: String Function(int) + shouldUseTypeForInitializerInference: false static instanceOfA @540 type: A + shouldUseTypeForInitializerInference: false static r_instanceClassMethod @567 type: String Function(int) + shouldUseTypeForInitializerInference: false synthetic static topLevelGetter @-1 type: int accessors @@ -2041,6 +2143,7 @@ library typeInferenceError: dependencyCycle arguments: [a, b] type: dynamic + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -2057,6 +2160,7 @@ library typeInferenceError: dependencyCycle arguments: [a, b] type: dynamic + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -2070,6 +2174,7 @@ library topLevelVariables static c @72 type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get c @-1 returnType: dynamic @@ -2099,6 +2204,7 @@ library typeInferenceError: dependencyCycle arguments: [a, b] type: dynamic + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -2114,8 +2220,10 @@ library typeInferenceError: dependencyCycle arguments: [a, b] type: dynamic + shouldUseTypeForInitializerInference: false static c @49 type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get b @-1 returnType: dynamic @@ -2149,16 +2257,20 @@ library typeInferenceError: dependencyCycle arguments: [a, b, c] type: dynamic + shouldUseTypeForInitializerInference: false static final b @19 typeInferenceError: dependencyCycle arguments: [a, b, c] type: dynamic + shouldUseTypeForInitializerInference: false static final c @32 typeInferenceError: dependencyCycle arguments: [a, b, c] type: dynamic + shouldUseTypeForInitializerInference: false static final d @45 type: dynamic + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: dynamic @@ -2206,6 +2318,7 @@ library topLevelVariables static a @15 type: A + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: A @@ -2229,8 +2342,10 @@ library topLevelVariables static s @25 type: String + shouldUseTypeForInitializerInference: false static h @49 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get s @-1 returnType: String @@ -2264,10 +2379,13 @@ library topLevelVariables static d @8 type: dynamic + shouldUseTypeForInitializerInference: true static s @15 type: String + shouldUseTypeForInitializerInference: false static h @37 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get d @-1 returnType: dynamic @@ -2304,8 +2422,10 @@ library topLevelVariables static a @4 type: double + shouldUseTypeForInitializerInference: false static b @17 type: bool + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: double @@ -2365,12 +2485,16 @@ library topLevelVariables static vObject @4 type: List + shouldUseTypeForInitializerInference: false static vNum @37 type: List + shouldUseTypeForInitializerInference: false static vNumEmpty @64 type: List + shouldUseTypeForInitializerInference: false static vInt @89 type: List + shouldUseTypeForInitializerInference: false accessors synthetic static get vObject @-1 returnType: List @@ -2415,10 +2539,13 @@ library topLevelVariables static vInt @4 type: List + shouldUseTypeForInitializerInference: false static vNum @26 type: List + shouldUseTypeForInitializerInference: false static vObject @47 type: List + shouldUseTypeForInitializerInference: false accessors synthetic static get vInt @-1 returnType: List @@ -2470,14 +2597,19 @@ library topLevelVariables static vObjectObject @4 type: Map + shouldUseTypeForInitializerInference: false static vComparableObject @50 type: Map, Object> + shouldUseTypeForInitializerInference: false static vNumString @109 type: Map + shouldUseTypeForInitializerInference: false static vNumStringEmpty @149 type: Map + shouldUseTypeForInitializerInference: false static vIntString @188 type: Map + shouldUseTypeForInitializerInference: false accessors synthetic static get vObjectObject @-1 returnType: Map @@ -2529,10 +2661,13 @@ library topLevelVariables static vIntString @4 type: Map + shouldUseTypeForInitializerInference: false static vNumString @39 type: Map + shouldUseTypeForInitializerInference: false static vIntObject @76 type: Map + shouldUseTypeForInitializerInference: false accessors synthetic static get vIntString @-1 returnType: Map @@ -2584,14 +2719,19 @@ library topLevelVariables static a @4 type: bool + shouldUseTypeForInitializerInference: false static b @18 type: bool + shouldUseTypeForInitializerInference: false static vEq @32 type: bool + shouldUseTypeForInitializerInference: false static vAnd @50 type: bool + shouldUseTypeForInitializerInference: false static vOr @69 type: bool + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: bool @@ -2675,10 +2815,13 @@ library topLevelVariables static instanceOfA @43 type: A + shouldUseTypeForInitializerInference: false static v1 @70 type: String + shouldUseTypeForInitializerInference: false static v2 @96 type: String + shouldUseTypeForInitializerInference: false accessors synthetic static get instanceOfA @-1 returnType: A @@ -2724,26 +2867,37 @@ library topLevelVariables static vModuloIntInt @4 type: int + shouldUseTypeForInitializerInference: false static vModuloIntDouble @31 type: double + shouldUseTypeForInitializerInference: false static vMultiplyIntInt @63 type: int + shouldUseTypeForInitializerInference: false static vMultiplyIntDouble @92 type: double + shouldUseTypeForInitializerInference: false static vMultiplyDoubleInt @126 type: double + shouldUseTypeForInitializerInference: false static vMultiplyDoubleDouble @160 type: double + shouldUseTypeForInitializerInference: false static vDivideIntInt @199 type: double + shouldUseTypeForInitializerInference: false static vDivideIntDouble @226 type: double + shouldUseTypeForInitializerInference: false static vDivideDoubleInt @258 type: double + shouldUseTypeForInitializerInference: false static vDivideDoubleDouble @290 type: double + shouldUseTypeForInitializerInference: false static vFloorDivide @327 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get vModuloIntInt @-1 returnType: int @@ -2837,10 +2991,13 @@ library topLevelVariables static a @4 type: int + shouldUseTypeForInitializerInference: false static vEq @15 type: bool + shouldUseTypeForInitializerInference: false static vNotEq @46 type: bool + shouldUseTypeForInitializerInference: false accessors synthetic static get a @-1 returnType: int @@ -2876,6 +3033,7 @@ library topLevelVariables static V @4 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get V @-1 returnType: int @@ -2902,16 +3060,22 @@ library topLevelVariables static vInt @4 type: int + shouldUseTypeForInitializerInference: false static vDouble @18 type: double + shouldUseTypeForInitializerInference: false static vIncInt @37 type: int + shouldUseTypeForInitializerInference: false static vDecInt @59 type: int + shouldUseTypeForInitializerInference: false static vIncDouble @81 type: double + shouldUseTypeForInitializerInference: false static vDecDouble @109 type: double + shouldUseTypeForInitializerInference: false accessors synthetic static get vInt @-1 returnType: int @@ -2973,16 +3137,22 @@ library topLevelVariables static vInt @4 type: List + shouldUseTypeForInitializerInference: false static vDouble @20 type: List + shouldUseTypeForInitializerInference: false static vIncInt @41 type: int + shouldUseTypeForInitializerInference: false static vDecInt @66 type: int + shouldUseTypeForInitializerInference: false static vIncDouble @91 type: double + shouldUseTypeForInitializerInference: false static vDecDouble @122 type: double + shouldUseTypeForInitializerInference: false accessors synthetic static get vInt @-1 returnType: List @@ -3044,16 +3214,22 @@ library topLevelVariables static vInt @4 type: int + shouldUseTypeForInitializerInference: false static vDouble @18 type: double + shouldUseTypeForInitializerInference: false static vIncInt @37 type: int + shouldUseTypeForInitializerInference: false static vDecInt @59 type: int + shouldUseTypeForInitializerInference: false static vIncDouble @81 type: double + shouldUseTypeForInitializerInference: false static vDecInt @109 type: double + shouldUseTypeForInitializerInference: false accessors synthetic static get vInt @-1 returnType: int @@ -3133,16 +3309,22 @@ library topLevelVariables static vInt @4 type: List + shouldUseTypeForInitializerInference: false static vDouble @20 type: List + shouldUseTypeForInitializerInference: false static vIncInt @41 type: int + shouldUseTypeForInitializerInference: false static vDecInt @66 type: int + shouldUseTypeForInitializerInference: false static vIncDouble @91 type: double + shouldUseTypeForInitializerInference: false static vDecInt @122 type: double + shouldUseTypeForInitializerInference: false accessors synthetic static get vInt @-1 returnType: List @@ -3199,6 +3381,7 @@ library topLevelVariables static vNot @4 type: bool + shouldUseTypeForInitializerInference: false accessors synthetic static get vNot @-1 returnType: bool @@ -3222,10 +3405,13 @@ library topLevelVariables static vNegateInt @4 type: int + shouldUseTypeForInitializerInference: false static vNegateDouble @25 type: double + shouldUseTypeForInitializerInference: false static vComplement @51 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get vNegateInt @-1 returnType: int @@ -3269,6 +3455,7 @@ library fields static d @21 type: D + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -3283,6 +3470,7 @@ library fields i @42 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -3296,6 +3484,7 @@ library topLevelVariables static final x @53 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: int @@ -3329,6 +3518,7 @@ library fields i @54 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -3342,6 +3532,7 @@ library topLevelVariables static x @63 type: int + shouldUseTypeForInitializerInference: false accessors synthetic static get x @-1 returnType: int @@ -3366,12 +3557,16 @@ library topLevelVariables static vLess @4 type: bool + shouldUseTypeForInitializerInference: false static vLessOrEqual @23 type: bool + shouldUseTypeForInitializerInference: false static vGreater @50 type: bool + shouldUseTypeForInitializerInference: false static vGreaterOrEqual @72 type: bool + shouldUseTypeForInitializerInference: false accessors synthetic static get vLess @-1 returnType: bool @@ -3431,6 +3626,7 @@ library fields x @25 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -3470,6 +3666,7 @@ library fields f @16 type: int + shouldUseTypeForInitializerInference: false constructors @25 parameters @@ -3511,10 +3708,13 @@ library fields x @25 type: int + shouldUseTypeForInitializerInference: true y @34 type: int + shouldUseTypeForInitializerInference: true z @43 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -3545,6 +3745,7 @@ library fields x @77 type: int + shouldUseTypeForInitializerInference: true synthetic y @-1 type: int synthetic z @-1 @@ -3586,6 +3787,7 @@ library fields x @29 type: dynamic + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -3602,6 +3804,7 @@ library fields x @63 type: dynamic + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -3639,10 +3842,13 @@ library fields x @26 type: E + shouldUseTypeForInitializerInference: true y @33 type: E + shouldUseTypeForInitializerInference: true z @40 type: E + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -3676,6 +3882,7 @@ library fields x @80 type: T + shouldUseTypeForInitializerInference: true synthetic y @-1 type: T synthetic z @-1 @@ -3717,6 +3924,7 @@ library fields x @25 type: dynamic + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -3733,6 +3941,7 @@ library fields x @59 type: dynamic + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -3763,6 +3972,7 @@ library fields x @25 type: num + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -3779,6 +3989,7 @@ library fields x @59 type: num + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -3832,6 +4043,7 @@ library fields x @89 type: int + shouldUseTypeForInitializerInference: true synthetic y @-1 type: int synthetic z @-1 @@ -3902,6 +4114,7 @@ library fields x @92 type: T + shouldUseTypeForInitializerInference: true synthetic y @-1 type: T synthetic z @-1 @@ -4189,8 +4402,10 @@ library fields x @148 type: dynamic + shouldUseTypeForInitializerInference: false final y @159 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -4358,6 +4573,7 @@ library fields x @108 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -4527,6 +4743,7 @@ library fields x @113 type: int + shouldUseTypeForInitializerInference: true synthetic y @-1 type: int synthetic z @-1 @@ -4769,6 +4986,7 @@ library fields x @94 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors @@ -4843,10 +5061,13 @@ library fields t1 @16 type: int + shouldUseTypeForInitializerInference: false t2 @30 type: double + shouldUseTypeForInitializerInference: false t3 @46 type: dynamic + shouldUseTypeForInitializerInference: false constructors synthetic @-1 accessors @@ -5398,6 +5619,7 @@ library fields m @16 type: int + shouldUseTypeForInitializerInference: true constructors synthetic @-1 accessors diff --git a/pkg/nnbd_migration/lib/src/fix_builder.dart b/pkg/nnbd_migration/lib/src/fix_builder.dart index 8b54ee0ca567..ad5ce160916a 100644 --- a/pkg/nnbd_migration/lib/src/fix_builder.dart +++ b/pkg/nnbd_migration/lib/src/fix_builder.dart @@ -198,7 +198,6 @@ class FixBuilder { source!, typeProvider, errorListener, - null /* inferenceErrorListener */, _typeSystem, FeatureSet.fromEnableFlags2( sdkLanguageVersion: Feature.non_nullable.releaseVersion!,