Version 3.7.0-299.0.dev Merge d5a860e8f70a28ba9a63339b5173fc5ca5ec85c9 into dev
diff --git a/pkg/analysis_server/analyzer_use_new_elements.txt b/pkg/analysis_server/analyzer_use_new_elements.txt index a24e185..0402a8a 100644 --- a/pkg/analysis_server/analyzer_use_new_elements.txt +++ b/pkg/analysis_server/analyzer_use_new_elements.txt
@@ -1,10 +1,7 @@ lib/plugin/protocol/protocol_dart.dart lib/src/analysis_server.dart lib/src/cider/rename.dart -lib/src/handler/legacy/edit_get_available_refactorings.dart lib/src/handler/legacy/search_find_element_references.dart -lib/src/lsp/handlers/handler_completion.dart -lib/src/lsp/handlers/handler_completion_resolve.dart lib/src/lsp/handlers/handler_rename.dart lib/src/protocol_server.dart lib/src/services/correction/namespace.dart
diff --git a/pkg/analysis_server/lib/src/handler/legacy/edit_get_available_refactorings.dart b/pkg/analysis_server/lib/src/handler/legacy/edit_get_available_refactorings.dart index 3a782aa..3edf646 100644 --- a/pkg/analysis_server/lib/src/handler/legacy/edit_get_available_refactorings.dart +++ b/pkg/analysis_server/lib/src/handler/legacy/edit_get_available_refactorings.dart
@@ -7,10 +7,9 @@ import 'package:analysis_server/protocol/protocol_generated.dart'; import 'package:analysis_server/src/handler/legacy/legacy_handler.dart'; import 'package:analysis_server/src/services/refactoring/legacy/refactoring.dart'; -import 'package:analyzer/dart/element/element.dart'; +import 'package:analyzer/dart/element/element2.dart'; import 'package:analyzer/src/dart/ast/utilities.dart'; import 'package:analyzer/src/util/file_paths.dart'; -import 'package:analyzer/src/utilities/extensions/element.dart'; import 'package:analyzer_plugin/protocol/protocol_common.dart'; /// The handler for the `edit.getAvailableRefactorings` request. @@ -81,21 +80,21 @@ var resolvedUnit = await server.getResolvedUnit(file); if (resolvedUnit != null) { var node = NodeLocator(offset).searchWithin(resolvedUnit.unit); - var element = server.getElementOfNode(node); + var element = server.getElementOfNode2(node); if (element != null) { var refactoringWorkspace = server.refactoringWorkspace; // try CONVERT_METHOD_TO_GETTER - if (element is ExecutableElement) { + if (element is ExecutableElement2) { if (ConvertMethodToGetterRefactoring( refactoringWorkspace, resolvedUnit.session, - element.asElement2, + element, ).isAvailable()) { kinds.add(RefactoringKind.CONVERT_METHOD_TO_GETTER); } } // try RENAME - var renameRefactoring = RenameRefactoring.create( + var renameRefactoring = RenameRefactoring.create2( refactoringWorkspace, resolvedUnit, element,
diff --git a/pkg/analyzer/analyzer_use_new_elements.txt b/pkg/analyzer/analyzer_use_new_elements.txt index cd8ab8b..4a1ab72 100644 --- a/pkg/analyzer/analyzer_use_new_elements.txt +++ b/pkg/analyzer/analyzer_use_new_elements.txt
@@ -23,7 +23,6 @@ lib/src/dart/ast/utilities.dart lib/src/dart/constant/constant_verifier.dart lib/src/dart/constant/evaluation.dart -lib/src/dart/constant/potentially_constant.dart lib/src/dart/constant/utilities.dart lib/src/dart/constant/value.dart lib/src/dart/element/class_hierarchy.dart @@ -105,7 +104,6 @@ lib/src/generated/testing/element_factory.dart lib/src/generated/testing/test_type_provider.dart lib/src/hint/sdk_constraint_verifier.dart -lib/src/lint/constants.dart lib/src/lint/linter.dart lib/src/services/top_level_declarations.dart lib/src/summary2/ast_binary_reader.dart @@ -146,7 +144,6 @@ lib/src/test_utilities/find_element.dart lib/src/test_utilities/find_node.dart lib/src/test_utilities/mock_sdk_elements.dart -lib/src/utilities/extensions/analysis_session.dart lib/src/utilities/extensions/ast.dart lib/src/utilities/extensions/element.dart lib/src/utilities/extensions/flutter.dart @@ -195,7 +192,6 @@ test/src/summary/elements/extension_type_test.dart test/src/summary/elements/metadata_test.dart test/src/summary/elements/top_level_variable_test.dart -test/src/summary/elements/type_alias_test.dart test/src/summary/elements/type_inference_test.dart test/src/summary/elements_base.dart test/src/summary/macro_test.dart
diff --git a/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart b/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart index 384ee1e..da876e6 100644 --- a/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart +++ b/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart
@@ -5,12 +5,12 @@ import 'package:analyzer/dart/analysis/features.dart'; import 'package:analyzer/dart/ast/ast.dart'; import 'package:analyzer/dart/ast/token.dart'; -import 'package:analyzer/dart/element/element.dart'; +import 'package:analyzer/dart/element/element2.dart'; import 'package:analyzer/dart/element/type.dart'; import 'package:analyzer/src/dart/ast/extensions.dart'; import 'package:analyzer/src/dart/element/type.dart'; -/// Some [ConstructorElement]s can be temporary marked as "const" to check +/// Some [ConstructorElement2]s can be temporary marked as "const" to check /// if doing this is valid. final temporaryConstConstructorElements = Expando<bool>(); @@ -39,8 +39,8 @@ } bool _isConstantTypeName(Identifier name) { - var element = name.staticElement; - if (element is InterfaceElement || element is TypeAliasElement) { + var element = name.element; + if (element is InterfaceElement2 || element is TypeAliasElement2) { if (name is PrefixedIdentifier) { if (name.isDeferred) { return false; @@ -212,7 +212,7 @@ } void _identifier(Identifier node) { - var element = node.staticElement; + var element = node.element; if (node is PrefixedIdentifier) { if (node.isDeferred) { @@ -223,7 +223,7 @@ collect(node.prefix); return; } - if (element is MethodElement && element.isStatic) { + if (element is MethodElement2 && element.isStatic) { if (!_isConstantTypeName(node.prefix)) { nodes.add(node); } @@ -231,9 +231,9 @@ } } - if (element is ParameterElement) { - var enclosing = element.enclosingElement3; - if (enclosing is ConstructorElement && + if (element is FormalParameterElement) { + var enclosing = element.enclosingElement2; + if (enclosing is ConstructorElement2 && isConstConstructorElement(enclosing)) { if (node.thisOrAncestorOfType<ConstructorInitializer>() != null) { return; @@ -243,14 +243,14 @@ return; } - if (element is VariableElement) { + if (element is VariableElement2) { if (!element.isConst) { nodes.add(node); } return; } - if (element is PropertyAccessorElement && element.isGetter) { - var variable = element.variable2; + if (element is GetterElement) { + var variable = element.variable3; if (variable == null) { return; } @@ -262,13 +262,13 @@ if (_isConstantTypeName(node)) { return; } - if (element is FunctionElement) { + if (element is TopLevelFunctionElement) { return; } - if (element is MethodElement && element.isStatic) { + if (element is MethodElement2 && element.isStatic) { return; } - if (element is TypeParameterElement && + if (element is TypeParameterElement2 && featureSet.isEnabled(Feature.constructor_tearoffs)) { return; } @@ -278,8 +278,8 @@ void _methodInvocation(MethodInvocation node) { var arguments = node.argumentList.arguments; if (arguments.length == 2) { - var element = node.methodName.staticElement; - if (element is FunctionElement && element.isDartCoreIdentical) { + var element = node.methodName.element; + if (element is TopLevelFunctionElement && element.isDartCoreIdentical) { collect(arguments[0]); collect(arguments[1]); return; @@ -304,9 +304,9 @@ return; } - var element = node.propertyName.staticElement; - if (element is PropertyAccessorElement && element.isGetter) { - var variable = element.variable2; + var element = node.propertyName.element; + if (element is GetterElement) { + var variable = element.variable3; if (variable == null) { return; } @@ -384,7 +384,7 @@ } } - static bool isConstConstructorElement(ConstructorElement element) { + static bool isConstConstructorElement(ConstructorElement2 element) { if (element.isConst) return true; return temporaryConstConstructorElements[element] ?? false; } @@ -402,7 +402,7 @@ } if (potentially && node is NamedType && - node.element is TypeParameterElement) { + node.element2 is TypeParameterElement2) { return true; } @@ -467,8 +467,8 @@ extension on NamedType { bool get isConstantNamedType { - var element = this.element; - if (element is InterfaceElement || element is TypeAliasElement) { + var element2 = this.element2; + if (element2 is InterfaceElement2 || element2 is TypeAliasElement2) { return !isDeferred; } return false;
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart index 37a3e75..6cbfbf2 100644 --- a/pkg/analyzer/lib/src/dart/element/element.dart +++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -1689,6 +1689,12 @@ return visitor.visitConstructorElement(this); } + /// Ensures that dependencies of this constructor, such as default values + /// of formal parameters, are evaluated. + void computeConstantDependencies() { + firstFragment.computeConstantDependencies(); + } + @override void visitChildren2<T>(ElementVisitor2<T> visitor) { for (var child in children2) {
diff --git a/pkg/analyzer/lib/src/lint/constants.dart b/pkg/analyzer/lib/src/lint/constants.dart index cb1ff1f..c26b78b 100644 --- a/pkg/analyzer/lib/src/lint/constants.dart +++ b/pkg/analyzer/lib/src/lint/constants.dart
@@ -4,7 +4,7 @@ import 'package:analyzer/dart/ast/token.dart'; import 'package:analyzer/dart/constant/value.dart'; -import 'package:analyzer/dart/element/element.dart'; +import 'package:analyzer/dart/element/element2.dart'; import 'package:analyzer/error/error.dart'; import 'package:analyzer/error/listener.dart'; import 'package:analyzer/src/dart/ast/ast.dart'; @@ -88,27 +88,30 @@ /// Whether [ConstantVerifier] reports an error when computing the value of /// `this` as a constant. bool get hasConstantVerifierError { - var unitElement = thisOrAncestorOfType<CompilationUnit>()?.declaredElement; - if (unitElement == null) return false; - var libraryElement = unitElement.library as LibraryElementImpl; + var unitNode = thisOrAncestorOfType<CompilationUnit>(); + var unitFragment = unitNode?.declaredFragment; + if (unitFragment == null) return false; + + var libraryElement = unitFragment.element as LibraryElementImpl; + var declaredVariables = libraryElement.session.declaredVariables; var dependenciesFinder = ConstantExpressionsDependenciesFinder(); accept(dependenciesFinder); computeConstants( - declaredVariables: unitElement.session.declaredVariables, + declaredVariables: declaredVariables, constants: dependenciesFinder.dependencies.toList(), featureSet: libraryElement.featureSet, configuration: ConstantEvaluationConfiguration(), ); var listener = _ConstantAnalysisErrorListener(); - var errorReporter = ErrorReporter(listener, unitElement.source); + var errorReporter = ErrorReporter(listener, unitFragment.source); accept( ConstantVerifier( errorReporter, libraryElement, - unitElement.session.declaredVariables, + declaredVariables, ), ); return listener.hasConstError; @@ -117,10 +120,10 @@ extension ConstructorDeclarationExtension on ConstructorDeclaration { bool get canBeConst { - var element = declaredElement!; + var element = declaredFragment!.element; - var classElement = element.enclosingElement3; - if (classElement is ClassElement && classElement.hasNonFinalField) { + var classElement = element.enclosingElement2; + if (classElement is ClassElement2 && classElement.hasNonFinalField) { return false; } @@ -156,14 +159,17 @@ /// Returns a [LinterConstantEvaluationResult], containing both the computed /// constant value, and a list of errors that occurred during the computation. LinterConstantEvaluationResult computeConstantValue() { - var unitElement = thisOrAncestorOfType<CompilationUnit>()?.declaredElement; - if (unitElement == null) return LinterConstantEvaluationResult._(null, []); - var libraryElement = unitElement.library as LibraryElementImpl; + var unitNode = thisOrAncestorOfType<CompilationUnit>(); + var unitFragment = unitNode?.declaredFragment; + if (unitFragment == null) { + return LinterConstantEvaluationResult._(null, []); + } - var errorListener = RecordingErrorListener(); + var libraryElement = unitFragment.element as LibraryElementImpl; + var declaredVariables = libraryElement.session.declaredVariables; var evaluationEngine = ConstantEvaluationEngine( - declaredVariables: unitElement.session.declaredVariables, + declaredVariables: declaredVariables, configuration: ConstantEvaluationConfiguration(), ); @@ -171,16 +177,17 @@ accept(ReferenceFinder(dependencies.add)); computeConstants( - declaredVariables: unitElement.session.declaredVariables, + declaredVariables: declaredVariables, constants: dependencies, featureSet: libraryElement.featureSet, configuration: ConstantEvaluationConfiguration(), ); + var errorListener = RecordingErrorListener(); var visitor = ConstantVisitor( evaluationEngine, libraryElement, - ErrorReporter(errorListener, unitElement.source), + ErrorReporter(errorListener, unitFragment.source), ); var constant = visitor.evaluateAndReportInvalidConstant(this); @@ -189,11 +196,11 @@ } bool _canBeConstInstanceCreation(InstanceCreationExpressionImpl node) { - var element = node.constructorName.staticElement; + var element = node.constructorName.element; if (element == null || !element.isConst) return false; // Ensure that dependencies (e.g. default parameter values) are computed. - var implElement = element.declaration as ConstructorElementImpl; + var implElement = element.baseElement as ConstructorElementImpl2; implElement.computeConstantDependencies(); // Verify that the evaluation of the constructor would not produce an
diff --git a/pkg/analyzer/lib/src/utilities/extensions/analysis_session.dart b/pkg/analyzer/lib/src/utilities/extensions/analysis_session.dart index 49f3db1..3a71c06 100644 --- a/pkg/analyzer/lib/src/utilities/extensions/analysis_session.dart +++ b/pkg/analyzer/lib/src/utilities/extensions/analysis_session.dart
@@ -4,10 +4,6 @@ import 'package:analyzer/dart/analysis/results.dart'; import 'package:analyzer/dart/analysis/session.dart'; -import 'package:analyzer/dart/element/element.dart'; -import 'package:analyzer/dart/element/element2.dart'; -import 'package:analyzer/src/utilities/extensions/element.dart'; -import 'package:analyzer/src/utilities/extensions/library_element.dart'; extension AnalysisSessionExtension on AnalysisSession { /// Return the resolved library for the library containing the file with the @@ -19,40 +15,9 @@ if (unitElement is! UnitElementResult) { return null; } - var libraryPath = unitElement.element.library.source.fullName; + var libraryPath = + unitElement.fragment.element.firstFragment.source.fullName; var result = await getResolvedLibrary(libraryPath); return result is ResolvedLibraryResult ? result : null; } - - /// Locates the [Element] that [location] represents. - /// - /// Local elements such as variables inside functions cannot be found using - /// this method. - /// - /// Returns `null` if the element cannot be found. - Future<Element?> locateElement(ElementLocation location) async { - var components = location.components; - if (location.components.isEmpty) { - return null; - } - - // The first component is the library which we'll use to start the search. - var libraryUri = components.first; - var result = await getLibraryByUri(libraryUri); - return result is LibraryElementResult - ? result.element.locateElement(location) - : null; - } - - /// Returns the element represented by the [location]. - /// - /// Local elements such as variables inside functions can't be found using - /// this method. - /// - /// Returns `null` if the element cannot be found. - Future<Element2?> locateElement2(ElementLocation location) async { - var result = await locateElement(location); - if (result == null) return null; - return result.asElement2; - } }
diff --git a/pkg/analyzer/test/src/summary/element_text.dart b/pkg/analyzer/test/src/summary/element_text.dart index ea5b2c7..83cfe54 100644 --- a/pkg/analyzer/test/src/summary/element_text.dart +++ b/pkg/analyzer/test/src/summary/element_text.dart
@@ -635,6 +635,7 @@ _sink.writeIf(e.isConst, 'const '); _sink.writeIf(e.isCovariant, 'covariant '); _sink.writeIf(e.isFinal, 'final '); + _sink.writeIf(e.hasImplicitType, 'hasImplicitType '); if (e is FieldFormalParameterElement) { _sink.write('this.'); @@ -2118,6 +2119,15 @@ }); } + void _assertEnclosingElement<E extends Element>( + Iterable<E> elements, + Element enclosingElement, + ) { + for (var element in elements) { + expect(element.enclosingElement3, same(enclosingElement)); + } + } + void _assertNonSyntheticElementSelf(Element element) { expect(element.isSynthetic, isFalse); expect(element.nonSynthetic, same(element)); @@ -3032,6 +3042,7 @@ _sink.writeIf(e.isConst, 'const '); _sink.writeIf(e.isCovariant, 'covariant '); _sink.writeIf(e.isFinal, 'final '); + _sink.writeIf(e.hasImplicitType, 'hasImplicitType '); if (e is FieldFormalParameterElement) { _sink.write('this.'); @@ -3299,6 +3310,8 @@ _writeMetadata(e); _writeSinceSdkVersion(e); _writeCodeRange(e); + + _assertEnclosingElement(e.typeParameters, e); _writeTypeParameterElements(e.typeParameters); var aliasedType = e.aliasedType; @@ -3306,10 +3319,21 @@ var aliasedElement = e.aliasedElement; if (aliasedElement is GenericFunctionTypeElementImpl) { + expect(aliasedElement.enclosingElement3, same(e)); _sink.writelnWithIndent('aliasedElement: GenericFunctionTypeElement'); _sink.withIndent(() { + _assertEnclosingElement( + aliasedElement.typeParameters, + aliasedElement, + ); _writeTypeParameterElements(aliasedElement.typeParameters); + + _assertEnclosingElement( + aliasedElement.parameters, + aliasedElement, + ); _writeParameterElements(aliasedElement.parameters); + _writeReturnType(aliasedElement.returnType); }); }
diff --git a/pkg/analyzer/test/src/summary/elements/class_test.dart b/pkg/analyzer/test/src/summary/elements/class_test.dart index b8dfecd..a4a9b05 100644 --- a/pkg/analyzer/test/src/summary/elements/class_test.dart +++ b/pkg/analyzer/test/src/summary/elements/class_test.dart
@@ -702,7 +702,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional final this.x @28 + requiredPositional final hasImplicitType this.x @28 type: dynamic field: <testLibraryFragment>::@class::C::@field::x accessors @@ -767,7 +767,7 @@ new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - requiredPositional final x + requiredPositional final hasImplicitType x type: dynamic getters synthetic get x @@ -1152,7 +1152,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional final this.x @17 + requiredPositional final hasImplicitType this.x @17 type: int field: <testLibraryFragment>::@class::C::@field::x::@def::0 accessors @@ -1247,7 +1247,7 @@ new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - requiredPositional final x + requiredPositional final hasImplicitType x type: int getters synthetic get x @@ -1287,7 +1287,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional final this.x @17 + requiredPositional final hasImplicitType this.x @17 type: dynamic field: <null> ---------------------------------------- @@ -1317,7 +1317,7 @@ new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - requiredPositional final x + requiredPositional final hasImplicitType x type: dynamic '''); } @@ -1549,7 +1549,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional final this.x @24 + requiredPositional final hasImplicitType this.x @24 type: num field: <testLibraryFragment>::@class::C::@field::x accessors @@ -1614,7 +1614,7 @@ new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - requiredPositional final x + requiredPositional final hasImplicitType x type: num getters synthetic get x @@ -1855,7 +1855,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional final this.x @24 + requiredPositional final hasImplicitType this.x @24 type: dynamic field: <testLibraryFragment>::@class::C::@field::x accessors @@ -1920,7 +1920,7 @@ new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - requiredPositional final x + requiredPositional final hasImplicitType x type: dynamic getters synthetic get x @@ -1957,7 +1957,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - optionalNamed default final this.x @25 + optionalNamed default final hasImplicitType this.x @25 reference: <testLibraryFragment>::@class::C::@constructor::new::@parameter::x type: int field: <testLibraryFragment>::@class::C::@field::x @@ -2024,7 +2024,7 @@ new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - optionalNamed final x + optionalNamed final hasImplicitType x firstFragment: <testLibraryFragment>::@class::C::@constructor::new::@parameter::x type: int getters @@ -2062,7 +2062,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - optionalNamed default final this.x @25 + optionalNamed default final hasImplicitType this.x @25 reference: <testLibraryFragment>::@class::C::@constructor::new::@parameter::x type: int constantInitializer @@ -2133,7 +2133,7 @@ new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - optionalNamed final x + optionalNamed final hasImplicitType x firstFragment: <testLibraryFragment>::@class::C::@constructor::new::@parameter::x type: int getters @@ -2171,7 +2171,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - optionalPositional default final this.x @25 + optionalPositional default final hasImplicitType this.x @25 type: int field: <testLibraryFragment>::@class::C::@field::x accessors @@ -2236,7 +2236,7 @@ new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - optionalPositional final x + optionalPositional final hasImplicitType x type: int getters synthetic get x @@ -2273,7 +2273,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - optionalPositional default final this.x @25 + optionalPositional default final hasImplicitType this.x @25 type: int constantInitializer IntegerLiteral @@ -2342,7 +2342,7 @@ new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - optionalPositional final x + optionalPositional final hasImplicitType x type: int getters synthetic get x @@ -3756,7 +3756,7 @@ periodOffset: 19 nameEnd: 23 parameters - requiredPositional a @24 + requiredPositional hasImplicitType a @24 type: dynamic optionalNamed default b @32 reference: <testLibraryFragment>::@class::A::@constructor::aaa::@parameter::b @@ -3869,7 +3869,7 @@ const aaa firstFragment: <testLibraryFragment>::@class::A::@constructor::aaa formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: dynamic optionalNamed b firstFragment: <testLibraryFragment>::@class::A::@constructor::aaa::@parameter::b @@ -4276,7 +4276,7 @@ periodOffset: 54 nameEnd: 60 parameters - requiredPositional a @61 + requiredPositional hasImplicitType a @61 type: dynamic optionalNamed default b @69 reference: <testLibraryFragment>::@class::C::@constructor::named::@parameter::b @@ -4350,7 +4350,7 @@ const named firstFragment: <testLibraryFragment>::@class::C::@constructor::named formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: dynamic optionalNamed b firstFragment: <testLibraryFragment>::@class::C::@constructor::named::@parameter::b @@ -4781,7 +4781,7 @@ reference: <testLibraryFragment>::@function::f enclosingElement3: <testLibraryFragment> parameters - requiredPositional final super.a @13 + requiredPositional final hasImplicitType super.a @13 type: dynamic superConstructorParameter: <null> returnType: void @@ -4803,7 +4803,7 @@ reference: <testLibrary>::@function::f firstFragment: <testLibraryFragment>::@function::f formalParameters - requiredPositional final a + requiredPositional final hasImplicitType a type: dynamic returnType: void '''); @@ -4853,14 +4853,14 @@ optionalNamed default o1 @87 reference: <testLibraryFragment>::@class::B::@constructor::new::@parameter::o1 type: String - optionalNamed default final super.a @97 + optionalNamed default final hasImplicitType super.a @97 reference: <testLibraryFragment>::@class::B::@constructor::new::@parameter::a type: int superConstructorParameter: <testLibraryFragment>::@class::A::@constructor::new::@parameter::a optionalNamed default o2 @107 reference: <testLibraryFragment>::@class::B::@constructor::new::@parameter::o2 type: String - optionalNamed default final super.b @117 + optionalNamed default final hasImplicitType super.b @117 reference: <testLibraryFragment>::@class::B::@constructor::new::@parameter::b type: double superConstructorParameter: <testLibraryFragment>::@class::A::@constructor::new::@parameter::b @@ -4936,13 +4936,13 @@ optionalNamed o1 firstFragment: <testLibraryFragment>::@class::B::@constructor::new::@parameter::o1 type: String - optionalNamed final a + optionalNamed final hasImplicitType a firstFragment: <testLibraryFragment>::@class::B::@constructor::new::@parameter::a type: int optionalNamed o2 firstFragment: <testLibraryFragment>::@class::B::@constructor::new::@parameter::o2 type: String - optionalNamed final b + optionalNamed final hasImplicitType b firstFragment: <testLibraryFragment>::@class::B::@constructor::new::@parameter::b type: double superConstructor: <testLibraryFragment>::@class::A::@constructor::new#element @@ -4992,7 +4992,7 @@ reference: <testLibraryFragment>::@class::B::@constructor::new enclosingElement3: <testLibraryFragment>::@class::B parameters - optionalNamed default final hasDefaultValue super.a @62 + optionalNamed default final hasImplicitType hasDefaultValue super.a @62 reference: <testLibraryFragment>::@class::B::@constructor::new::@parameter::a type: int superConstructorParameter: <testLibraryFragment>::@class::A::@constructor::new::@parameter::a @@ -5050,7 +5050,7 @@ new firstFragment: <testLibraryFragment>::@class::B::@constructor::new formalParameters - optionalNamed final a + optionalNamed final hasImplicitType a firstFragment: <testLibraryFragment>::@class::B::@constructor::new::@parameter::a type: int superConstructor: <testLibraryFragment>::@class::A::@constructor::new#element @@ -5095,7 +5095,7 @@ reference: <testLibraryFragment>::@class::B::@constructor::new enclosingElement3: <testLibraryFragment>::@class::B parameters - optionalNamed default final super.b @67 + optionalNamed default final hasImplicitType super.b @67 reference: <testLibraryFragment>::@class::B::@constructor::new::@parameter::b type: dynamic superConstructorParameter: <null> @@ -5153,7 +5153,7 @@ new firstFragment: <testLibraryFragment>::@class::B::@constructor::new formalParameters - optionalNamed final b + optionalNamed final hasImplicitType b firstFragment: <testLibraryFragment>::@class::B::@constructor::new::@parameter::b type: dynamic superConstructor: <testLibraryFragment>::@class::A::@constructor::new#element @@ -5197,7 +5197,7 @@ reference: <testLibraryFragment>::@class::B::@constructor::new enclosingElement3: <testLibraryFragment>::@class::B parameters - optionalNamed default final super.a @56 + optionalNamed default final hasImplicitType super.a @56 reference: <testLibraryFragment>::@class::B::@constructor::new::@parameter::a type: dynamic superConstructorParameter: <null> @@ -5253,7 +5253,7 @@ new firstFragment: <testLibraryFragment>::@class::B::@constructor::new formalParameters - optionalNamed final a + optionalNamed final hasImplicitType a firstFragment: <testLibraryFragment>::@class::B::@constructor::new::@parameter::a type: dynamic superConstructor: <testLibraryFragment>::@class::A::@constructor::new#element @@ -5301,12 +5301,12 @@ parameters optionalPositional default o1 @67 type: String - optionalPositional default final super.a @77 + optionalPositional default final hasImplicitType super.a @77 type: int superConstructorParameter: <testLibraryFragment>::@class::A::@constructor::new::@parameter::a optionalPositional default o2 @87 type: String - optionalPositional default final super.b @97 + optionalPositional default final hasImplicitType super.b @97 type: double superConstructorParameter: <testLibraryFragment>::@class::A::@constructor::new::@parameter::b superConstructor: <testLibraryFragment>::@class::A::@constructor::new @@ -5372,11 +5372,11 @@ formalParameters optionalPositional o1 type: String - optionalPositional final a + optionalPositional final hasImplicitType a type: int optionalPositional o2 type: String - optionalPositional final b + optionalPositional final hasImplicitType b type: double superConstructor: <testLibraryFragment>::@class::A::@constructor::new#element '''); @@ -5431,14 +5431,14 @@ requiredNamed default o1 @101 reference: <testLibraryFragment>::@class::B::@constructor::new::@parameter::o1 type: String - requiredNamed default final super.a @124 + requiredNamed default final hasImplicitType super.a @124 reference: <testLibraryFragment>::@class::B::@constructor::new::@parameter::a type: int superConstructorParameter: <testLibraryFragment>::@class::A::@constructor::new::@parameter::a requiredNamed default o2 @147 reference: <testLibraryFragment>::@class::B::@constructor::new::@parameter::o2 type: String - requiredNamed default final super.b @170 + requiredNamed default final hasImplicitType super.b @170 reference: <testLibraryFragment>::@class::B::@constructor::new::@parameter::b type: double superConstructorParameter: <testLibraryFragment>::@class::A::@constructor::new::@parameter::b @@ -5514,13 +5514,13 @@ requiredNamed o1 firstFragment: <testLibraryFragment>::@class::B::@constructor::new::@parameter::o1 type: String - requiredNamed final a + requiredNamed final hasImplicitType a firstFragment: <testLibraryFragment>::@class::B::@constructor::new::@parameter::a type: int requiredNamed o2 firstFragment: <testLibraryFragment>::@class::B::@constructor::new::@parameter::o2 type: String - requiredNamed final b + requiredNamed final hasImplicitType b firstFragment: <testLibraryFragment>::@class::B::@constructor::new::@parameter::b type: double superConstructor: <testLibraryFragment>::@class::A::@constructor::new#element @@ -5570,7 +5570,7 @@ reference: <testLibraryFragment>::@class::B::@constructor::new enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredNamed default final super.a @71 + requiredNamed default final hasImplicitType super.a @71 reference: <testLibraryFragment>::@class::B::@constructor::new::@parameter::a type: int superConstructorParameter: <testLibraryFragment>::@class::A::@constructor::new::@parameter::a @@ -5628,7 +5628,7 @@ new firstFragment: <testLibraryFragment>::@class::B::@constructor::new formalParameters - requiredNamed final a + requiredNamed final hasImplicitType a firstFragment: <testLibraryFragment>::@class::B::@constructor::new::@parameter::a type: int superConstructor: <testLibraryFragment>::@class::A::@constructor::new#element @@ -5676,12 +5676,12 @@ parameters requiredPositional o1 @66 type: String - requiredPositional final super.a @76 + requiredPositional final hasImplicitType super.a @76 type: int superConstructorParameter: <testLibraryFragment>::@class::A::@constructor::new::@parameter::a requiredPositional o2 @86 type: String - requiredPositional final super.b @96 + requiredPositional final hasImplicitType super.b @96 type: double superConstructorParameter: <testLibraryFragment>::@class::A::@constructor::new::@parameter::b superConstructor: <testLibraryFragment>::@class::A::@constructor::new @@ -5747,11 +5747,11 @@ formalParameters requiredPositional o1 type: String - requiredPositional final a + requiredPositional final hasImplicitType a type: int requiredPositional o2 type: String - requiredPositional final b + requiredPositional final hasImplicitType b type: double superConstructor: <testLibraryFragment>::@class::A::@constructor::new#element '''); @@ -5800,7 +5800,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional final super.a @64 + requiredPositional final hasImplicitType super.a @64 type: int superConstructorParameter: <testLibraryFragment>::@class::B::@constructor::new::@parameter::a superConstructor: <testLibraryFragment>::@class::B::@constructor::new @@ -5813,7 +5813,7 @@ reference: <testLibraryFragment>::@class::B::@constructor::new enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional final super.a @101 + requiredPositional final hasImplicitType super.a @101 type: int superConstructorParameter: <testLibraryFragment>::@class::A::@constructor::new::@parameter::a superConstructor: <testLibraryFragment>::@class::A::@constructor::new @@ -5880,7 +5880,7 @@ new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - requiredPositional final a + requiredPositional final hasImplicitType a type: int superConstructor: <testLibraryFragment>::@class::B::@constructor::new#element class B @@ -5891,7 +5891,7 @@ new firstFragment: <testLibraryFragment>::@class::B::@constructor::new formalParameters - requiredPositional final a + requiredPositional final hasImplicitType a type: int superConstructor: <testLibraryFragment>::@class::A::@constructor::new#element '''); @@ -5940,7 +5940,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional final super.a @63 + requiredPositional final hasImplicitType super.a @63 type: int superConstructorParameter: SuperFormalParameterMember base: <testLibraryFragment>::@class::B::@constructor::new::@parameter::a @@ -5960,7 +5960,7 @@ reference: <testLibraryFragment>::@class::B::@constructor::new enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional final super.a @103 + requiredPositional final hasImplicitType super.a @103 type: int superConstructorParameter: <testLibraryFragment>::@class::A::@constructor::new::@parameter::a superConstructor: <testLibraryFragment>::@class::A::@constructor::new @@ -6032,7 +6032,7 @@ new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - requiredPositional final a + requiredPositional final hasImplicitType a type: int superConstructor: <testLibraryFragment>::@class::B::@constructor::new#element class B @@ -6045,7 +6045,7 @@ new firstFragment: <testLibraryFragment>::@class::B::@constructor::new formalParameters - requiredPositional final a + requiredPositional final hasImplicitType a type: int superConstructor: <testLibraryFragment>::@class::A::@constructor::new#element '''); @@ -6083,7 +6083,7 @@ reference: <testLibraryFragment>::@class::B::@constructor::new enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional final super.a @42 + requiredPositional final hasImplicitType super.a @42 type: dynamic superConstructorParameter: <null> superConstructor: <testLibraryFragment>::@class::A::@constructor::new @@ -6130,7 +6130,7 @@ new firstFragment: <testLibraryFragment>::@class::B::@constructor::new formalParameters - requiredPositional final a + requiredPositional final hasImplicitType a type: dynamic superConstructor: <testLibraryFragment>::@class::A::@constructor::new#element '''); @@ -6174,7 +6174,7 @@ reference: <testLibraryFragment>::@class::B::@constructor::new enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional final super.a @65 + requiredPositional final hasImplicitType super.a @65 type: dynamic superConstructorParameter: <null> superConstructor: <testLibraryFragment>::@class::A::@constructor::new @@ -6230,7 +6230,7 @@ new firstFragment: <testLibraryFragment>::@class::B::@constructor::new formalParameters - requiredPositional final a + requiredPositional final hasImplicitType a type: dynamic superConstructor: <testLibraryFragment>::@class::A::@constructor::new#element '''); @@ -6254,7 +6254,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional x @12 + requiredPositional hasImplicitType x @12 type: dynamic requiredPositional y @19 type: int @@ -6287,7 +6287,7 @@ new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - requiredPositional x + requiredPositional hasImplicitType x type: dynamic requiredPositional y type: int @@ -11535,7 +11535,7 @@ reference: <testLibraryFragment>::@class::A::@constructor::new enclosingElement3: <testLibraryFragment>::@class::A parameters - requiredPositional final this.foo @36 + requiredPositional final hasImplicitType this.foo @36 type: int field: <testLibraryFragment>::@class::A::@field::foo accessors @@ -11604,7 +11604,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final foo + requiredPositional final hasImplicitType foo type: int getters synthetic get foo @@ -11643,7 +11643,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional final this.v @34 + requiredPositional final hasImplicitType this.v @34 type: int field: <testLibraryFragment>::@class::C::@field::v superConstructor: <testLibraryFragment>::@class::D::@constructor::new @@ -11745,7 +11745,7 @@ new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - requiredPositional final v + requiredPositional final hasImplicitType v type: int superConstructor: <testLibraryFragment>::@class::D::@constructor::new#element getters @@ -12829,7 +12829,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -12912,7 +12912,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -13006,7 +13006,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -13089,7 +13089,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -13172,7 +13172,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -13262,7 +13262,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -13348,7 +13348,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -13427,7 +13427,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -13501,7 +13501,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -13650,7 +13650,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -13790,7 +13790,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -13912,7 +13912,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -14049,7 +14049,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -14173,7 +14173,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -14290,7 +14290,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -14380,7 +14380,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -14398,7 +14398,7 @@ reference: <testLibrary>::@class::B::@method::A firstFragment: <testLibraryFragment>::@class::B::@method::A formalParameters - requiredPositional final value + requiredPositional final hasImplicitType value type: dynamic class C reference: <testLibrary>::@class::C @@ -14515,7 +14515,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -14629,7 +14629,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -14858,7 +14858,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic get _foo @@ -18785,7 +18785,7 @@ reference: <testLibraryFragment>::@class::C::@method::f enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional value @27 + requiredPositional hasImplicitType value @27 type: int returnType: void abstract class D @54 @@ -18855,7 +18855,7 @@ reference: <testLibrary>::@class::C::@method::f firstFragment: <testLibraryFragment>::@class::C::@method::f formalParameters - requiredPositional value + requiredPositional hasImplicitType value type: int abstract class D reference: <testLibrary>::@class::D @@ -19261,9 +19261,9 @@ reference: <testLibraryFragment>::@class::C::@method::f enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional x @12 + requiredPositional hasImplicitType x @12 type: dynamic - requiredPositional y @15 + requiredPositional hasImplicitType y @15 type: dynamic returnType: dynamic ---------------------------------------- @@ -19302,9 +19302,9 @@ reference: <testLibrary>::@class::C::@method::f firstFragment: <testLibraryFragment>::@class::C::@method::f formalParameters - requiredPositional x + requiredPositional hasImplicitType x type: dynamic - requiredPositional y + requiredPositional hasImplicitType y type: dynamic '''); } @@ -23397,7 +23397,7 @@ reference: <testLibraryFragment>::@class::C::@setter::x enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional value @21 + requiredPositional hasImplicitType value @21 type: dynamic returnType: void ---------------------------------------- @@ -23443,7 +23443,7 @@ set x firstFragment: <testLibraryFragment>::@class::C::@setter::x formalParameters - requiredPositional value + requiredPositional hasImplicitType value type: dynamic '''); } @@ -23628,7 +23628,7 @@ reference: <testLibraryFragment>::@class::D::@setter::t enclosingElement3: <testLibraryFragment>::@class::D parameters - requiredPositional p @123 + requiredPositional hasImplicitType p @123 type: dynamic returnType: void ---------------------------------------- @@ -23791,7 +23791,7 @@ set t firstFragment: <testLibraryFragment>::@class::D::@setter::t formalParameters - requiredPositional p + requiredPositional hasImplicitType p type: dynamic '''); } @@ -23827,7 +23827,7 @@ reference: <testLibraryFragment>::@class::C::@setter::f enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional value @31 + requiredPositional hasImplicitType value @31 type: int returnType: void abstract class D @58 @@ -23916,7 +23916,7 @@ set f firstFragment: <testLibraryFragment>::@class::C::@setter::f formalParameters - requiredPositional value + requiredPositional hasImplicitType value type: int abstract class D reference: <testLibrary>::@class::D @@ -24047,7 +24047,7 @@ reference: <testLibraryFragment>::@class::C::@setter::x enclosingElement3: <testLibraryFragment>::@class::C parameters - optionalNamed default a @22 + optionalNamed default hasImplicitType a @22 reference: <testLibraryFragment>::@class::C::@setter::x::@parameter::a type: dynamic returnType: void @@ -24095,7 +24095,7 @@ set x firstFragment: <testLibraryFragment>::@class::C::@setter::x formalParameters - optionalNamed a + optionalNamed hasImplicitType a firstFragment: <testLibraryFragment>::@class::C::@setter::x::@parameter::a type: dynamic '''); @@ -24197,7 +24197,7 @@ reference: <testLibraryFragment>::@class::C::@setter::x enclosingElement3: <testLibraryFragment>::@class::C parameters - optionalPositional default a @22 + optionalPositional default hasImplicitType a @22 type: dynamic returnType: void ---------------------------------------- @@ -24243,7 +24243,7 @@ set x firstFragment: <testLibraryFragment>::@class::C::@setter::x formalParameters - optionalPositional a + optionalPositional hasImplicitType a type: dynamic '''); } @@ -24275,9 +24275,9 @@ reference: <testLibraryFragment>::@class::C::@setter::x enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional a @21 + requiredPositional hasImplicitType a @21 type: dynamic - requiredPositional b @24 + requiredPositional hasImplicitType b @24 type: dynamic returnType: void ---------------------------------------- @@ -24325,9 +24325,9 @@ set x firstFragment: <testLibraryFragment>::@class::C::@setter::x formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: dynamic - requiredPositional b + requiredPositional hasImplicitType b type: dynamic '''); } @@ -24772,7 +24772,7 @@ reference: <testLibraryFragment>::@class::C::@setter::y enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional value @45 + requiredPositional hasImplicitType value @45 type: dynamic returnType: void ---------------------------------------- @@ -24837,7 +24837,7 @@ set y firstFragment: <testLibraryFragment>::@class::C::@setter::y formalParameters - requiredPositional value + requiredPositional hasImplicitType value type: dynamic '''); } @@ -30890,7 +30890,7 @@ periodOffset: 37 nameEnd: 43 parameters - requiredPositional final this.x @49 + requiredPositional final hasImplicitType this.x @49 type: Object field: <testLibraryFragment>::@class::C::@field::x accessors @@ -30984,7 +30984,7 @@ const named firstFragment: <testLibraryFragment>::@class::C::@constructor::named formalParameters - requiredPositional final x + requiredPositional final hasImplicitType x type: Object getters synthetic get x @@ -31048,7 +31048,7 @@ reference: <testLibraryFragment>::@class::C::@setter::bar enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional final this.foo @41 + requiredPositional final hasImplicitType this.foo @41 type: dynamic field: <null> returnType: void @@ -31123,7 +31123,7 @@ set bar firstFragment: <testLibraryFragment>::@class::C::@setter::bar formalParameters - requiredPositional final foo + requiredPositional final hasImplicitType foo type: dynamic '''); } @@ -31159,7 +31159,7 @@ reference: <testLibraryFragment>::@class::C::@setter::x enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional final this.x @23 + requiredPositional final hasImplicitType this.x @23 type: dynamic field: <null> returnType: void @@ -31206,7 +31206,7 @@ set x firstFragment: <testLibraryFragment>::@class::C::@setter::x formalParameters - requiredPositional final x + requiredPositional final hasImplicitType x type: dynamic '''); } @@ -33508,7 +33508,7 @@ periodOffset: 42 nameEnd: 48 parameters - requiredPositional final this.f @54 + requiredPositional final hasImplicitType this.f @54 type: int field: <testLibraryFragment>::@class::A::@field::f ---------------------------------------- @@ -33564,7 +33564,7 @@ named firstFragment: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named formalParameters - requiredPositional final f + requiredPositional final hasImplicitType f type: int getters synthetic get f @@ -35905,7 +35905,7 @@ reference: <testLibraryFragment>::@class::A::@constructor::new enclosingElement3: <testLibraryFragment>::@class::A parameters - requiredPositional final this.foo @34 + requiredPositional final hasImplicitType this.foo @34 type: int field: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo augmented @@ -35984,7 +35984,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final foo + requiredPositional final hasImplicitType foo type: int getters synthetic get foo @@ -41925,7 +41925,7 @@ reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B::@method::foo enclosingElement3: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B parameters - requiredPositional a @45 + requiredPositional hasImplicitType a @45 type: String returnType: int ---------------------------------------- @@ -41978,7 +41978,7 @@ reference: <testLibrary>::@class::B::@method::foo firstFragment: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B::@method::foo formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: String '''); } @@ -42030,7 +42030,7 @@ reference: <testLibraryFragment>::@class::B::@method::foo enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @32 + requiredPositional hasImplicitType a @32 type: String returnType: int augmented @@ -42101,7 +42101,7 @@ reference: <testLibrary>::@class::B::@method::foo firstFragment: <testLibraryFragment>::@class::B::@method::foo formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: String '''); } @@ -42153,7 +42153,7 @@ reference: <testLibraryFragment>::@class::B::@method::foo enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @32 + requiredPositional hasImplicitType a @32 type: String returnType: int augmented @@ -42225,7 +42225,7 @@ reference: <testLibrary>::@class::B::@method::foo firstFragment: <testLibraryFragment>::@class::B::@method::foo formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: String '''); } @@ -42284,7 +42284,7 @@ reference: <testLibraryFragment>::@class::B::@method::foo enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @59 + requiredPositional hasImplicitType a @59 type: String returnType: int augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B::@methodAugmentation::foo @@ -42305,7 +42305,7 @@ reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B::@methodAugmentation::foo enclosingElement3: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B parameters - requiredPositional a @53 + requiredPositional hasImplicitType a @53 type: String returnType: int augmentationTarget: <testLibraryFragment>::@class::B::@method::foo @@ -42368,7 +42368,7 @@ reference: <testLibrary>::@class::B::@method::foo firstFragment: <testLibraryFragment>::@class::B::@method::foo formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: String '''); }
diff --git a/pkg/analyzer/test/src/summary/elements/const_test.dart b/pkg/analyzer/test/src/summary/elements/const_test.dart index 3736540..dc0c8ad 100644 --- a/pkg/analyzer/test/src/summary/elements/const_test.dart +++ b/pkg/analyzer/test/src/summary/elements/const_test.dart
@@ -476,7 +476,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional final this.t @41 + requiredPositional final hasImplicitType this.t @41 type: T field: <testLibraryFragment>::@class::C::@field::t const named @55 @@ -485,7 +485,7 @@ periodOffset: 54 nameEnd: 60 parameters - requiredPositional final this.t @66 + requiredPositional final hasImplicitType this.t @66 type: T field: <testLibraryFragment>::@class::C::@field::t accessors @@ -634,12 +634,12 @@ const new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - requiredPositional final t + requiredPositional final hasImplicitType t type: T const named firstFragment: <testLibraryFragment>::@class::C::@constructor::named formalParameters - requiredPositional final t + requiredPositional final hasImplicitType t type: T getters synthetic get t @@ -3066,7 +3066,7 @@ reference: <testLibraryFragment>::@class::A::@constructor::new enclosingElement3: <testLibraryFragment>::@class::A parameters - requiredPositional final this.t @41 + requiredPositional final hasImplicitType this.t @41 type: T field: <testLibraryFragment>::@class::A::@field::t accessors @@ -3161,7 +3161,7 @@ const new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final t + requiredPositional final hasImplicitType t type: T getters synthetic get t @@ -6533,7 +6533,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - optionalNamed default final this.x @37 + optionalNamed default final hasImplicitType this.x @37 reference: <testLibraryFragment>::@class::C::@constructor::new::@parameter::x type: dynamic constantInitializer @@ -6599,7 +6599,7 @@ const new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - optionalNamed final x + optionalNamed final hasImplicitType x firstFragment: <testLibraryFragment>::@class::C::@constructor::new::@parameter::x type: dynamic getters @@ -6641,7 +6641,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - optionalNamed default final this.x @37 + optionalNamed default final hasImplicitType this.x @37 reference: <testLibraryFragment>::@class::C::@constructor::new::@parameter::x type: dynamic constantInitializer @@ -6705,7 +6705,7 @@ const new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - optionalNamed final x + optionalNamed final hasImplicitType x firstFragment: <testLibraryFragment>::@class::C::@constructor::new::@parameter::x type: dynamic getters @@ -6742,7 +6742,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - optionalPositional default final this.x @37 + optionalPositional default final hasImplicitType this.x @37 type: dynamic constantInitializer BinaryExpression @@ -6804,7 +6804,7 @@ const new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - optionalPositional final x + optionalPositional final hasImplicitType x type: dynamic getters synthetic get x @@ -6841,7 +6841,7 @@ periodOffset: 19 nameEnd: 30 parameters - optionalPositional default p @32 + optionalPositional default hasImplicitType p @32 type: dynamic constantInitializer BinaryExpression @@ -6862,7 +6862,7 @@ periodOffset: 54 nameEnd: 60 parameters - optionalNamed default p @62 + optionalNamed default hasImplicitType p @62 reference: <testLibraryFragment>::@class::C::@constructor::named::@parameter::p type: dynamic constantInitializer @@ -6883,7 +6883,7 @@ reference: <testLibraryFragment>::@class::C::@method::methodPositional enclosingElement3: <testLibraryFragment>::@class::C parameters - optionalPositional default p @99 + optionalPositional default hasImplicitType p @99 type: dynamic constantInitializer BinaryExpression @@ -6903,14 +6903,14 @@ reference: <testLibraryFragment>::@class::C::@method::methodPositionalWithoutDefault enclosingElement3: <testLibraryFragment>::@class::C parameters - optionalPositional default p @153 + optionalPositional default hasImplicitType p @153 type: dynamic returnType: void methodNamed @167 reference: <testLibraryFragment>::@class::C::@method::methodNamed enclosingElement3: <testLibraryFragment>::@class::C parameters - optionalNamed default p @180 + optionalNamed default hasImplicitType p @180 reference: <testLibraryFragment>::@class::C::@method::methodNamed::@parameter::p type: dynamic constantInitializer @@ -6931,7 +6931,7 @@ reference: <testLibraryFragment>::@class::C::@method::methodNamedWithoutDefault enclosingElement3: <testLibraryFragment>::@class::C parameters - optionalNamed default p @228 + optionalNamed default hasImplicitType p @228 reference: <testLibraryFragment>::@class::C::@method::methodNamedWithoutDefault::@parameter::p type: dynamic returnType: void @@ -7000,12 +7000,12 @@ const positional firstFragment: <testLibraryFragment>::@class::C::@constructor::positional formalParameters - optionalPositional p + optionalPositional hasImplicitType p type: dynamic const named firstFragment: <testLibraryFragment>::@class::C::@constructor::named formalParameters - optionalNamed p + optionalNamed hasImplicitType p firstFragment: <testLibraryFragment>::@class::C::@constructor::named::@parameter::p type: dynamic methods @@ -7013,26 +7013,26 @@ reference: <testLibrary>::@class::C::@method::methodPositional firstFragment: <testLibraryFragment>::@class::C::@method::methodPositional formalParameters - optionalPositional p + optionalPositional hasImplicitType p type: dynamic methodPositionalWithoutDefault reference: <testLibrary>::@class::C::@method::methodPositionalWithoutDefault firstFragment: <testLibraryFragment>::@class::C::@method::methodPositionalWithoutDefault formalParameters - optionalPositional p + optionalPositional hasImplicitType p type: dynamic methodNamed reference: <testLibrary>::@class::C::@method::methodNamed firstFragment: <testLibraryFragment>::@class::C::@method::methodNamed formalParameters - optionalNamed p + optionalNamed hasImplicitType p firstFragment: <testLibraryFragment>::@class::C::@method::methodNamed::@parameter::p type: dynamic methodNamedWithoutDefault reference: <testLibrary>::@class::C::@method::methodNamedWithoutDefault firstFragment: <testLibraryFragment>::@class::C::@method::methodNamedWithoutDefault formalParameters - optionalNamed p + optionalNamed hasImplicitType p firstFragment: <testLibraryFragment>::@class::C::@method::methodNamedWithoutDefault::@parameter::p type: dynamic ''');
diff --git a/pkg/analyzer/test/src/summary/elements/default_value_test.dart b/pkg/analyzer/test/src/summary/elements/default_value_test.dart index 41b165c..bbc164a 100644 --- a/pkg/analyzer/test/src/summary/elements/default_value_test.dart +++ b/pkg/analyzer/test/src/summary/elements/default_value_test.dart
@@ -136,7 +136,7 @@ reference: <testLibraryFragment>::@class::X::@constructor::new enclosingElement3: <testLibraryFragment>::@class::X parameters - optionalNamed default final this.f @90 + optionalNamed default final hasImplicitType this.f @90 reference: <testLibraryFragment>::@class::X::@constructor::new::@parameter::f type: void Function(dynamic) alias: <testLibraryFragment>::@typeAlias::F @@ -246,7 +246,7 @@ const new firstFragment: <testLibraryFragment>::@class::X::@constructor::new formalParameters - optionalNamed final f + optionalNamed final hasImplicitType f firstFragment: <testLibraryFragment>::@class::X::@constructor::new::@parameter::f type: void Function(dynamic) alias: <testLibraryFragment>::@typeAlias::F @@ -313,7 +313,7 @@ reference: <testLibraryFragment>::@class::B::@method::foo enclosingElement3: <testLibraryFragment>::@class::B parameters - optionalNamed default a @50 + optionalNamed default hasImplicitType a @50 reference: <testLibraryFragment>::@class::B::@method::foo::@parameter::a type: dynamic constantInitializer @@ -403,7 +403,7 @@ reference: <testLibrary>::@class::B::@method::foo firstFragment: <testLibraryFragment>::@class::B::@method::foo formalParameters - optionalNamed a + optionalNamed hasImplicitType a firstFragment: <testLibraryFragment>::@class::B::@method::foo::@parameter::a type: dynamic '''); @@ -428,7 +428,7 @@ requiredPositional g @8 type: dynamic Function({dynamic a}) parameters - optionalNamed a @11 + optionalNamed hasImplicitType a @11 type: dynamic returnType: void ---------------------------------------- @@ -452,7 +452,7 @@ requiredPositional g type: dynamic Function({dynamic a}) formalParameters - optionalNamed a + optionalNamed hasImplicitType a type: dynamic returnType: void ''');
diff --git a/pkg/analyzer/test/src/summary/elements/duplicate_declaration_test.dart b/pkg/analyzer/test/src/summary/elements/duplicate_declaration_test.dart index 87e9bb7..1813401 100644 --- a/pkg/analyzer/test/src/summary/elements/duplicate_declaration_test.dart +++ b/pkg/analyzer/test/src/summary/elements/duplicate_declaration_test.dart
@@ -1292,7 +1292,7 @@ reference: <testLibraryFragment>::@extensionType::E::@def::0::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::E::@def::0 parameters - requiredPositional final this.it @21 + requiredPositional final hasImplicitType this.it @21 type: int field: <testLibraryFragment>::@extensionType::E::@def::0::@field::it accessors @@ -1316,7 +1316,7 @@ reference: <testLibraryFragment>::@extensionType::E::@def::1::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::E::@def::1 parameters - requiredPositional final this.it @52 + requiredPositional final hasImplicitType this.it @52 type: double field: <testLibraryFragment>::@extensionType::E::@def::1::@field::it accessors @@ -1389,7 +1389,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::E::@def::0::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -1409,7 +1409,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::E::@def::1::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: double getters synthetic get it
diff --git a/pkg/analyzer/test/src/summary/elements/enum_test.dart b/pkg/analyzer/test/src/summary/elements/enum_test.dart index 8df9063..0ac1d45 100644 --- a/pkg/analyzer/test/src/summary/elements/enum_test.dart +++ b/pkg/analyzer/test/src/summary/elements/enum_test.dart
@@ -1319,7 +1319,7 @@ reference: <testLibraryFragment>::@enum::E::@constructor::new enclosingElement3: <testLibraryFragment>::@enum::E parameters - requiredPositional final this.x @62 + requiredPositional final hasImplicitType this.x @62 type: int field: <testLibraryFragment>::@enum::E::@field::x::@def::0 accessors @@ -1414,7 +1414,7 @@ const new firstFragment: <testLibraryFragment>::@enum::E::@constructor::new formalParameters - requiredPositional final x + requiredPositional final hasImplicitType x type: int getters synthetic static get v @@ -1487,7 +1487,7 @@ reference: <testLibraryFragment>::@enum::E::@constructor::new enclosingElement3: <testLibraryFragment>::@enum::E parameters - requiredPositional final this.x @29 + requiredPositional final hasImplicitType this.x @29 type: dynamic field: <null> accessors @@ -1552,7 +1552,7 @@ const new firstFragment: <testLibraryFragment>::@enum::E::@constructor::new formalParameters - requiredPositional final x + requiredPositional final hasImplicitType x type: dynamic getters synthetic static get v @@ -1626,7 +1626,7 @@ reference: <testLibraryFragment>::@enum::E::@constructor::new enclosingElement3: <testLibraryFragment>::@enum::E parameters - optionalNamed default final this.x @45 + optionalNamed default final hasImplicitType this.x @45 reference: <testLibraryFragment>::@enum::E::@constructor::new::@parameter::x type: int constantInitializer @@ -1721,7 +1721,7 @@ const new firstFragment: <testLibraryFragment>::@enum::E::@constructor::new formalParameters - optionalNamed final x + optionalNamed final hasImplicitType x firstFragment: <testLibraryFragment>::@enum::E::@constructor::new::@parameter::x type: int getters @@ -2110,7 +2110,7 @@ reference: <testLibraryFragment>::@enum::E::@constructor::new enclosingElement3: <testLibraryFragment>::@enum::E parameters - requiredPositional final this.x @34 + requiredPositional final hasImplicitType this.x @34 type: dynamic field: <testLibraryFragment>::@enum::E::@field::x accessors @@ -2190,7 +2190,7 @@ new firstFragment: <testLibraryFragment>::@enum::E::@constructor::new formalParameters - requiredPositional final x + requiredPositional final hasImplicitType x type: dynamic getters synthetic static get v @@ -3046,7 +3046,7 @@ new firstFragment: <testLibraryFragment>::@enum::E::@constructor::new formalParameters - requiredPositional final _foo + requiredPositional final hasImplicitType _foo type: int? getters synthetic static get v @@ -7345,7 +7345,7 @@ reference: <testLibraryFragment>::@class::A::@constructor::new enclosingElement3: <testLibraryFragment>::@class::A parameters - requiredPositional final this.value @48 + requiredPositional final hasImplicitType this.value @48 type: dynamic field: <testLibraryFragment>::@class::A::@field::value accessors @@ -7576,7 +7576,7 @@ const new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final value + requiredPositional final hasImplicitType value type: dynamic getters synthetic get value @@ -12063,7 +12063,7 @@ periodOffset: 48 nameEnd: 54 parameters - requiredPositional final this.f @60 + requiredPositional final hasImplicitType this.f @60 type: int field: <testLibraryFragment>::@enum::A::@field::f ---------------------------------------- @@ -12142,7 +12142,7 @@ const named firstFragment: <testLibrary>::@fragment::package:test/a.dart::@enumAugmentation::A::@constructor::named formalParameters - requiredPositional final f + requiredPositional final hasImplicitType f type: int getters synthetic static get v @@ -14384,7 +14384,7 @@ reference: <testLibraryFragment>::@enum::A::@constructor::new enclosingElement3: <testLibraryFragment>::@enum::A parameters - requiredPositional final this.foo @47 + requiredPositional final hasImplicitType this.foo @47 type: int field: <testLibrary>::@fragment::package:test/a.dart::@enumAugmentation::A::@field::foo accessors @@ -14503,7 +14503,7 @@ const new firstFragment: <testLibraryFragment>::@enum::A::@constructor::new formalParameters - requiredPositional final foo + requiredPositional final hasImplicitType foo type: int getters synthetic static get v @@ -21165,7 +21165,7 @@ reference: <testLibrary>::@fragment::package:test/b.dart::@enumAugmentation::B::@method::foo enclosingElement3: <testLibrary>::@fragment::package:test/b.dart::@enumAugmentation::B parameters - requiredPositional a @45 + requiredPositional hasImplicitType a @45 type: String returnType: int ---------------------------------------- @@ -21248,7 +21248,7 @@ reference: <testLibrary>::@enum::B::@method::foo firstFragment: <testLibrary>::@fragment::package:test/b.dart::@enumAugmentation::B::@method::foo formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: String '''); } @@ -21322,7 +21322,7 @@ reference: <testLibraryFragment>::@enum::B::@method::foo enclosingElement3: <testLibraryFragment>::@enum::B parameters - requiredPositional a @36 + requiredPositional hasImplicitType a @36 type: String returnType: int augmented @@ -21432,7 +21432,7 @@ reference: <testLibrary>::@enum::B::@method::foo firstFragment: <testLibraryFragment>::@enum::B::@method::foo formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: String '''); } @@ -21506,7 +21506,7 @@ reference: <testLibraryFragment>::@enum::B::@method::foo enclosingElement3: <testLibraryFragment>::@enum::B parameters - requiredPositional a @36 + requiredPositional hasImplicitType a @36 type: String returnType: int augmented @@ -21616,7 +21616,7 @@ reference: <testLibrary>::@enum::B::@method::foo firstFragment: <testLibraryFragment>::@enum::B::@method::foo formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: String '''); }
diff --git a/pkg/analyzer/test/src/summary/elements/extension_type_test.dart b/pkg/analyzer/test/src/summary/elements/extension_type_test.dart index 1728f75..8ab4506 100644 --- a/pkg/analyzer/test/src/summary/elements/extension_type_test.dart +++ b/pkg/analyzer/test/src/summary/elements/extension_type_test.dart
@@ -177,7 +177,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @27 + requiredPositional final hasImplicitType this.it @27 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -229,7 +229,7 @@ const new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -275,7 +275,7 @@ periodOffset: 16 nameEnd: 22 parameters - requiredPositional final this.it @27 + requiredPositional final hasImplicitType this.it @27 type: int codeOffset: 23 codeLength: 6 @@ -332,7 +332,7 @@ named firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::named formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -371,7 +371,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @21 + requiredPositional final hasImplicitType this.it @21 type: num field: <testLibraryFragment>::@extensionType::A::@field::it named @31 @@ -380,7 +380,7 @@ periodOffset: 30 nameEnd: 36 parameters - requiredPositional final this.it @42 + requiredPositional final hasImplicitType this.it @42 type: num field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -441,12 +441,12 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: num named firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::named formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: num getters synthetic get it @@ -485,7 +485,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @21 + requiredPositional final hasImplicitType this.it @21 type: num field: <testLibraryFragment>::@extensionType::A::@field::it named @31 @@ -555,7 +555,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: num named firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::named @@ -599,7 +599,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @21 + requiredPositional final hasImplicitType this.it @21 type: num field: <testLibraryFragment>::@extensionType::A::@field::it const named @37 @@ -694,7 +694,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: num const named firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::named @@ -743,7 +743,7 @@ codeOffset: 16 codeLength: 8 parameters - requiredPositional final this.it @21 + requiredPositional final hasImplicitType this.it @21 type: int codeOffset: 17 codeLength: 6 @@ -799,7 +799,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -839,7 +839,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @30 + requiredPositional final hasImplicitType this.it @30 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -892,7 +892,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -1228,7 +1228,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @43 + requiredPositional final hasImplicitType this.it @43 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -1282,7 +1282,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -2250,7 +2250,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @43 + requiredPositional final hasImplicitType this.it @43 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -2304,7 +2304,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -2604,7 +2604,7 @@ codeOffset: 16 codeLength: 2 parameters - requiredPositional final this.<empty> @17 + requiredPositional final hasImplicitType this.<empty> @17 type: InvalidType codeOffset: 17 codeLength: 0 @@ -2660,7 +2660,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final <empty> + requiredPositional final hasImplicitType <empty> type: InvalidType getters synthetic get <null-name> @@ -3578,7 +3578,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @45 + requiredPositional final hasImplicitType this.it @45 type: Map<T, U> field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -3639,7 +3639,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: Map<T, U> getters synthetic get it @@ -3697,7 +3697,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @36 + requiredPositional final hasImplicitType this.it @36 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -3802,7 +3802,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -3871,7 +3871,7 @@ reference: <testLibrary>::@fragment::package:test/a.dart::@extensionTypeAugmentation::A::@constructorAugmentation::new enclosingElement3: <testLibrary>::@fragment::package:test/a.dart::@extensionTypeAugmentation::A parameters - requiredPositional final this.it @65 + requiredPositional final hasImplicitType this.it @65 type: int field: <testLibrary>::@fragment::package:test/a.dart::@extensionTypeAugmentation::A::@field::it accessors @@ -3974,7 +3974,7 @@ new firstFragment: <testLibrary>::@fragment::package:test/a.dart::@extensionTypeAugmentation::A::@constructorAugmentation::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -4032,7 +4032,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @36 + requiredPositional final hasImplicitType this.it @36 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -4123,7 +4123,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int named firstFragment: <testLibrary>::@fragment::package:test/a.dart::@extensionTypeAugmentation::A::@constructor::named @@ -4179,7 +4179,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @40 + requiredPositional final hasImplicitType this.it @40 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -4289,7 +4289,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int named firstFragment: <testLibrary>::@fragment::package:test/a.dart::@extensionTypeAugmentation::A::@constructor::named @@ -4347,7 +4347,7 @@ periodOffset: 31 nameEnd: 37 parameters - requiredPositional final this.it @42 + requiredPositional final hasImplicitType this.it @42 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -4436,7 +4436,7 @@ named firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::named formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int new firstFragment: <testLibrary>::@fragment::package:test/a.dart::@extensionTypeAugmentation::A::@constructor::new @@ -4503,7 +4503,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @36 + requiredPositional final hasImplicitType this.it @36 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -4634,7 +4634,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -4719,7 +4719,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @51 + requiredPositional final hasImplicitType this.it @51 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -4884,7 +4884,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -4969,7 +4969,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @51 + requiredPositional final hasImplicitType this.it @51 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -5134,7 +5134,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -5219,7 +5219,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @51 + requiredPositional final hasImplicitType this.it @51 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -5390,7 +5390,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -5463,7 +5463,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @36 + requiredPositional final hasImplicitType this.it @36 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -5594,7 +5594,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -5667,7 +5667,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @36 + requiredPositional final hasImplicitType this.it @36 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -5779,7 +5779,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -5845,7 +5845,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @36 + requiredPositional final hasImplicitType this.it @36 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -6012,7 +6012,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -6089,7 +6089,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @36 + requiredPositional final hasImplicitType this.it @36 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -6216,7 +6216,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -6285,7 +6285,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @40 + requiredPositional final hasImplicitType this.it @40 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -6427,7 +6427,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -6495,7 +6495,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @36 + requiredPositional final hasImplicitType this.it @36 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -6627,7 +6627,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -6711,7 +6711,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @51 + requiredPositional final hasImplicitType this.it @51 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -6877,7 +6877,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -6954,7 +6954,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @36 + requiredPositional final hasImplicitType this.it @36 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -7086,7 +7086,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -7164,7 +7164,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @51 + requiredPositional final hasImplicitType this.it @51 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -7311,7 +7311,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -7571,7 +7571,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @36 + requiredPositional final hasImplicitType this.it @36 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -7606,7 +7606,7 @@ reference: <testLibraryFragment>::@extensionType::I1::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::I1 parameters - requiredPositional final this.it @79 + requiredPositional final hasImplicitType this.it @79 type: int field: <testLibraryFragment>::@extensionType::I1::@field::it accessors @@ -7645,7 +7645,7 @@ reference: <testLibrary>::@fragment::package:test/a.dart::@extensionType::I2::@constructor::new enclosingElement3: <testLibrary>::@fragment::package:test/a.dart::@extensionType::I2 parameters - requiredPositional final this.it @108 + requiredPositional final hasImplicitType this.it @108 type: int field: <testLibrary>::@fragment::package:test/a.dart::@extensionType::I2::@field::it accessors @@ -7678,7 +7678,7 @@ reference: <testLibrary>::@fragment::package:test/b.dart::@extensionType::I3::@constructor::new enclosingElement3: <testLibrary>::@fragment::package:test/b.dart::@extensionType::I3 parameters - requiredPositional final this.it @90 + requiredPositional final hasImplicitType this.it @90 type: int field: <testLibrary>::@fragment::package:test/b.dart::@extensionType::I3::@field::it accessors @@ -7819,7 +7819,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -7839,7 +7839,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::I1::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -7859,7 +7859,7 @@ new firstFragment: <testLibrary>::@fragment::package:test/a.dart::@extensionType::I2::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -7879,7 +7879,7 @@ new firstFragment: <testLibrary>::@fragment::package:test/b.dart::@extensionType::I3::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -7935,7 +7935,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @39 + requiredPositional final hasImplicitType this.it @39 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -7969,7 +7969,7 @@ reference: <testLibraryFragment>::@extensionType::I1::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::I1 parameters - requiredPositional final this.it @82 + requiredPositional final hasImplicitType this.it @82 type: int field: <testLibraryFragment>::@extensionType::I1::@field::it accessors @@ -8008,7 +8008,7 @@ reference: <testLibrary>::@fragment::package:test/a.dart::@extensionType::I2::@constructor::new enclosingElement3: <testLibrary>::@fragment::package:test/a.dart::@extensionType::I2 parameters - requiredPositional final this.it @104 + requiredPositional final hasImplicitType this.it @104 type: int field: <testLibrary>::@fragment::package:test/a.dart::@extensionType::I2::@field::it accessors @@ -8127,7 +8127,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -8147,7 +8147,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::I1::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -8169,7 +8169,7 @@ new firstFragment: <testLibrary>::@fragment::package:test/a.dart::@extensionType::I2::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -8225,7 +8225,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @39 + requiredPositional final hasImplicitType this.it @39 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -8258,7 +8258,7 @@ reference: <testLibraryFragment>::@extensionType::I1::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::I1 parameters - requiredPositional final this.it @82 + requiredPositional final hasImplicitType this.it @82 type: int field: <testLibraryFragment>::@extensionType::I1::@field::it accessors @@ -8299,7 +8299,7 @@ reference: <testLibrary>::@fragment::package:test/a.dart::@extensionType::I2::@constructor::new enclosingElement3: <testLibrary>::@fragment::package:test/a.dart::@extensionType::I2 parameters - requiredPositional final this.it @108 + requiredPositional final hasImplicitType this.it @108 type: int field: <testLibrary>::@fragment::package:test/a.dart::@extensionType::I2::@field::it accessors @@ -8419,7 +8419,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -8439,7 +8439,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::I1::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -8461,7 +8461,7 @@ new firstFragment: <testLibrary>::@fragment::package:test/a.dart::@extensionType::I2::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -8514,7 +8514,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @36 + requiredPositional final hasImplicitType this.it @36 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -8612,7 +8612,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -8673,7 +8673,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @36 + requiredPositional final hasImplicitType this.it @36 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -8782,7 +8782,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -8850,7 +8850,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @36 + requiredPositional final hasImplicitType this.it @36 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -8988,7 +8988,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -9048,7 +9048,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @39 + requiredPositional final hasImplicitType this.it @39 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -9159,7 +9159,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -9222,7 +9222,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @39 + requiredPositional final hasImplicitType this.it @39 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -9336,7 +9336,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -9394,7 +9394,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @36 + requiredPositional final hasImplicitType this.it @36 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -9511,7 +9511,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -9580,7 +9580,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @36 + requiredPositional final hasImplicitType this.it @36 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -9720,7 +9720,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -9795,7 +9795,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @36 + requiredPositional final hasImplicitType this.it @36 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -9933,7 +9933,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it @@ -10010,7 +10010,7 @@ reference: <testLibraryFragment>::@extensionType::A::@constructor::new enclosingElement3: <testLibraryFragment>::@extensionType::A parameters - requiredPositional final this.it @36 + requiredPositional final hasImplicitType this.it @36 type: int field: <testLibraryFragment>::@extensionType::A::@field::it accessors @@ -10161,7 +10161,7 @@ new firstFragment: <testLibraryFragment>::@extensionType::A::@constructor::new formalParameters - requiredPositional final it + requiredPositional final hasImplicitType it type: int getters synthetic get it
diff --git a/pkg/analyzer/test/src/summary/elements/formal_parameter_test.dart b/pkg/analyzer/test/src/summary/elements/formal_parameter_test.dart index 80927ed..328fa46 100644 --- a/pkg/analyzer/test/src/summary/elements/formal_parameter_test.dart +++ b/pkg/analyzer/test/src/summary/elements/formal_parameter_test.dart
@@ -553,9 +553,9 @@ requiredPositional g @12 type: dynamic Function(dynamic, dynamic) parameters - requiredPositional x @14 + requiredPositional hasImplicitType x @14 type: dynamic - requiredPositional y @17 + requiredPositional hasImplicitType y @17 type: dynamic returnType: dynamic ---------------------------------------- @@ -595,9 +595,9 @@ requiredPositional g type: dynamic Function(dynamic, dynamic) formalParameters - requiredPositional x + requiredPositional hasImplicitType x type: dynamic - requiredPositional y + requiredPositional hasImplicitType y type: dynamic '''); } @@ -892,7 +892,7 @@ periodOffset: 13 nameEnd: 24 parameters - optionalPositional default x @26 + optionalPositional default hasImplicitType x @26 type: dynamic constantInitializer IntegerLiteral @@ -904,7 +904,7 @@ periodOffset: 38 nameEnd: 44 parameters - optionalNamed default x @46 + optionalNamed default hasImplicitType x @46 reference: <testLibraryFragment>::@class::C::@constructor::named::@parameter::x type: dynamic constantInitializer @@ -949,12 +949,12 @@ positional firstFragment: <testLibraryFragment>::@class::C::@constructor::positional formalParameters - optionalPositional x + optionalPositional hasImplicitType x type: dynamic named firstFragment: <testLibraryFragment>::@class::C::@constructor::named formalParameters - optionalNamed x + optionalNamed hasImplicitType x firstFragment: <testLibraryFragment>::@class::C::@constructor::named::@parameter::x type: dynamic '''); @@ -993,7 +993,7 @@ periodOffset: 22 nameEnd: 33 parameters - optionalPositional default final this.x @40 + optionalPositional default final hasImplicitType this.x @40 type: dynamic constantInitializer IntegerLiteral @@ -1006,7 +1006,7 @@ periodOffset: 52 nameEnd: 58 parameters - optionalNamed default final this.x @65 + optionalNamed default final hasImplicitType this.x @65 reference: <testLibraryFragment>::@class::C::@constructor::named::@parameter::x type: dynamic constantInitializer @@ -1087,12 +1087,12 @@ positional firstFragment: <testLibraryFragment>::@class::C::@constructor::positional formalParameters - optionalPositional final x + optionalPositional final hasImplicitType x type: dynamic named firstFragment: <testLibraryFragment>::@class::C::@constructor::named formalParameters - optionalNamed final x + optionalNamed final hasImplicitType x firstFragment: <testLibraryFragment>::@class::C::@constructor::named::@parameter::x type: dynamic getters @@ -1136,7 +1136,7 @@ reference: <testLibraryFragment>::@class::C::@method::positional enclosingElement3: <testLibraryFragment>::@class::C parameters - optionalPositional default x @36 + optionalPositional default hasImplicitType x @36 type: dynamic constantInitializer IntegerLiteral @@ -1147,7 +1147,7 @@ reference: <testLibraryFragment>::@class::C::@method::named enclosingElement3: <testLibraryFragment>::@class::C parameters - optionalNamed default x @68 + optionalNamed default hasImplicitType x @68 reference: <testLibraryFragment>::@class::C::@method::named::@parameter::x type: dynamic constantInitializer @@ -1196,13 +1196,13 @@ reference: <testLibrary>::@class::C::@method::positional firstFragment: <testLibraryFragment>::@class::C::@method::positional formalParameters - optionalPositional x + optionalPositional hasImplicitType x type: dynamic static named reference: <testLibrary>::@class::C::@method::named firstFragment: <testLibraryFragment>::@class::C::@method::named formalParameters - optionalNamed x + optionalNamed hasImplicitType x firstFragment: <testLibraryFragment>::@class::C::@method::named::@parameter::x type: dynamic '''); @@ -1228,7 +1228,7 @@ reference: <testLibraryFragment>::@function::positional enclosingElement3: <testLibraryFragment> parameters - optionalPositional default x @17 + optionalPositional default hasImplicitType x @17 type: dynamic constantInitializer IntegerLiteral @@ -1239,7 +1239,7 @@ reference: <testLibraryFragment>::@function::named enclosingElement3: <testLibraryFragment> parameters - optionalNamed default x @40 + optionalNamed default hasImplicitType x @40 reference: <testLibraryFragment>::@function::named::@parameter::x type: dynamic constantInitializer @@ -1272,14 +1272,14 @@ reference: <testLibrary>::@function::positional firstFragment: <testLibraryFragment>::@function::positional formalParameters - optionalPositional x + optionalPositional hasImplicitType x type: dynamic returnType: void named reference: <testLibrary>::@function::named firstFragment: <testLibraryFragment>::@function::named formalParameters - optionalNamed x + optionalNamed hasImplicitType x firstFragment: <testLibraryFragment>::@function::named::@parameter::x type: dynamic returnType: void
diff --git a/pkg/analyzer/test/src/summary/elements/metadata_test.dart b/pkg/analyzer/test/src/summary/elements/metadata_test.dart index e538dfe..190be03 100644 --- a/pkg/analyzer/test/src/summary/elements/metadata_test.dart +++ b/pkg/analyzer/test/src/summary/elements/metadata_test.dart
@@ -83,7 +83,7 @@ reference: <testLibraryFragment>::@class::A::@constructor::new enclosingElement3: <testLibraryFragment>::@class::A parameters - requiredPositional o @45 + requiredPositional hasImplicitType o @45 type: dynamic ---------------------------------------- library @@ -126,7 +126,7 @@ const new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional o + requiredPositional hasImplicitType o type: dynamic '''); } @@ -184,7 +184,7 @@ reference: <testLibraryFragment>::@class::A::@constructor::new enclosingElement3: <testLibraryFragment>::@class::A parameters - requiredPositional o @47 + requiredPositional hasImplicitType o @47 type: dynamic ---------------------------------------- library @@ -227,7 +227,7 @@ const new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional o + requiredPositional hasImplicitType o type: dynamic '''); } @@ -2737,7 +2737,7 @@ reference: <testLibraryFragment>::@class::A::@constructor::new enclosingElement3: <testLibraryFragment>::@class::A parameters - requiredPositional x @18 + requiredPositional hasImplicitType x @18 type: dynamic class C @39 reference: <testLibraryFragment>::@class::C @@ -2798,7 +2798,7 @@ const new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional x + requiredPositional hasImplicitType x type: dynamic class C reference: <testLibrary>::@class::C @@ -3273,7 +3273,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional final this.x @47 + requiredPositional final hasImplicitType this.x @47 type: dynamic metadata Annotation @@ -3382,7 +3382,7 @@ new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - requiredPositional final x + requiredPositional final hasImplicitType x type: dynamic metadata Annotation @@ -3439,7 +3439,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - optionalPositional default final this.x @44 + optionalPositional default final hasImplicitType this.x @44 type: dynamic metadata Annotation @@ -3552,7 +3552,7 @@ new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - optionalPositional final x + optionalPositional final hasImplicitType x type: dynamic metadata Annotation @@ -3829,7 +3829,7 @@ element: <testLibraryFragment>::@getter::a element2: <testLibraryFragment>::@getter::a#element parameters - requiredPositional value @25 + requiredPositional hasImplicitType value @25 type: dynamic returnType: void ---------------------------------------- @@ -3896,7 +3896,7 @@ element: <testLibraryFragment>::@getter::a element2: <testLibraryFragment>::@getter::a#element formalParameters - requiredPositional value + requiredPositional hasImplicitType value type: dynamic '''); } @@ -4649,7 +4649,7 @@ reference: <testLibraryFragment>::@function::f enclosingElement3: <testLibraryFragment> parameters - requiredPositional _ @2 + requiredPositional hasImplicitType _ @2 type: dynamic returnType: dynamic ---------------------------------------- @@ -4686,7 +4686,7 @@ reference: <testLibrary>::@function::f firstFragment: <testLibraryFragment>::@function::f formalParameters - requiredPositional _ + requiredPositional hasImplicitType _ type: dynamic returnType: dynamic '''); @@ -5376,7 +5376,7 @@ element: <testLibraryFragment>::@getter::a element2: <testLibraryFragment>::@getter::a#element parameters - requiredPositional value @39 + requiredPositional hasImplicitType value @39 type: dynamic returnType: void topLevelVariables @@ -5466,7 +5466,7 @@ element: <testLibraryFragment>::@getter::a element2: <testLibraryFragment>::@getter::a#element formalParameters - requiredPositional value + requiredPositional hasImplicitType value type: dynamic topLevelVariables const hasInitializer a @@ -9127,7 +9127,7 @@ reference: <testLibraryFragment>::@function::f enclosingElement3: <testLibraryFragment> parameters - requiredPositional x @21 + requiredPositional hasImplicitType x @21 type: dynamic metadata Annotation @@ -9186,7 +9186,7 @@ reference: <testLibrary>::@function::f firstFragment: <testLibraryFragment>::@function::f formalParameters - requiredPositional x + requiredPositional hasImplicitType x type: dynamic metadata Annotation @@ -9230,7 +9230,7 @@ reference: <testLibraryFragment>::@class::C::@method::m enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional x @34 + requiredPositional hasImplicitType x @34 type: dynamic metadata Annotation @@ -9311,7 +9311,7 @@ reference: <testLibrary>::@class::C::@method::m firstFragment: <testLibraryFragment>::@class::C::@method::m formalParameters - requiredPositional x + requiredPositional hasImplicitType x type: dynamic metadata Annotation @@ -9482,7 +9482,7 @@ reference: <testLibraryFragment>::@function::f enclosingElement3: <testLibraryFragment> parameters - optionalPositional default x @22 + optionalPositional default hasImplicitType x @22 type: dynamic metadata Annotation @@ -9545,7 +9545,7 @@ reference: <testLibrary>::@function::f firstFragment: <testLibraryFragment>::@function::f formalParameters - optionalPositional x + optionalPositional hasImplicitType x type: dynamic metadata Annotation @@ -9600,7 +9600,7 @@ reference: <testLibraryFragment>::@class::B::@constructor::new enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional final super.x @75 + requiredPositional final hasImplicitType super.x @75 type: int metadata Annotation @@ -9698,7 +9698,7 @@ new firstFragment: <testLibraryFragment>::@class::B::@constructor::new formalParameters - requiredPositional final x + requiredPositional final hasImplicitType x type: int metadata Annotation @@ -11082,7 +11082,7 @@ reference: <testLibraryFragment>::@class::A::@constructor::new enclosingElement3: <testLibraryFragment>::@class::A parameters - requiredPositional _ @20 + requiredPositional hasImplicitType _ @20 type: dynamic class C @43 reference: <testLibraryFragment>::@class::C @@ -11143,7 +11143,7 @@ const new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional _ + requiredPositional hasImplicitType _ type: dynamic class C reference: <testLibrary>::@class::C @@ -11179,7 +11179,7 @@ reference: <testLibraryFragment>::@class::A::@constructor::new enclosingElement3: <testLibraryFragment>::@class::A parameters - requiredPositional _ @20 + requiredPositional hasImplicitType _ @20 type: dynamic class C @42 reference: <testLibraryFragment>::@class::C @@ -11240,7 +11240,7 @@ const new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional _ + requiredPositional hasImplicitType _ type: dynamic class C reference: <testLibrary>::@class::C
diff --git a/pkg/analyzer/test/src/summary/elements/mixin_test.dart b/pkg/analyzer/test/src/summary/elements/mixin_test.dart index 55a375e..7acafed 100644 --- a/pkg/analyzer/test/src/summary/elements/mixin_test.dart +++ b/pkg/analyzer/test/src/summary/elements/mixin_test.dart
@@ -8089,7 +8089,7 @@ reference: <testLibrary>::@fragment::package:test/b.dart::@mixinAugmentation::B::@method::foo enclosingElement3: <testLibrary>::@fragment::package:test/b.dart::@mixinAugmentation::B parameters - requiredPositional a @45 + requiredPositional hasImplicitType a @45 type: String returnType: int ---------------------------------------- @@ -8133,7 +8133,7 @@ reference: <testLibrary>::@mixin::B::@method::foo firstFragment: <testLibrary>::@fragment::package:test/b.dart::@mixinAugmentation::B::@method::foo formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: String '''); } @@ -8183,7 +8183,7 @@ reference: <testLibraryFragment>::@mixin::B::@method::foo enclosingElement3: <testLibraryFragment>::@mixin::B parameters - requiredPositional a @32 + requiredPositional hasImplicitType a @32 type: String returnType: int augmented @@ -8248,7 +8248,7 @@ reference: <testLibrary>::@mixin::B::@method::foo firstFragment: <testLibraryFragment>::@mixin::B::@method::foo formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: String '''); } @@ -8296,7 +8296,7 @@ reference: <testLibraryFragment>::@mixin::B::@method::foo enclosingElement3: <testLibraryFragment>::@mixin::B parameters - requiredPositional a @32 + requiredPositional hasImplicitType a @32 type: String returnType: int augmented @@ -8357,7 +8357,7 @@ reference: <testLibrary>::@mixin::B::@method::foo firstFragment: <testLibraryFragment>::@mixin::B::@method::foo formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: String '''); } @@ -8412,7 +8412,7 @@ reference: <testLibraryFragment>::@mixin::B::@method::foo enclosingElement3: <testLibraryFragment>::@mixin::B parameters - requiredPositional a @54 + requiredPositional hasImplicitType a @54 type: String returnType: int augmentation: <testLibrary>::@fragment::package:test/b.dart::@mixinAugmentation::B::@methodAugmentation::foo @@ -8433,7 +8433,7 @@ reference: <testLibrary>::@fragment::package:test/b.dart::@mixinAugmentation::B::@methodAugmentation::foo enclosingElement3: <testLibrary>::@fragment::package:test/b.dart::@mixinAugmentation::B parameters - requiredPositional a @53 + requiredPositional hasImplicitType a @53 type: String returnType: int augmentationTarget: <testLibraryFragment>::@mixin::B::@method::foo @@ -8487,7 +8487,7 @@ reference: <testLibrary>::@mixin::B::@method::foo firstFragment: <testLibraryFragment>::@mixin::B::@method::foo formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: String '''); }
diff --git a/pkg/analyzer/test/src/summary/elements/top_level_function_test.dart b/pkg/analyzer/test/src/summary/elements/top_level_function_test.dart index 5b92f16..7b878b1 100644 --- a/pkg/analyzer/test/src/summary/elements/top_level_function_test.dart +++ b/pkg/analyzer/test/src/summary/elements/top_level_function_test.dart
@@ -349,7 +349,7 @@ reference: <testLibraryFragment>::@function::f enclosingElement3: <testLibraryFragment> parameters - requiredPositional x @13 + requiredPositional hasImplicitType x @13 type: dynamic returnType: void ---------------------------------------- @@ -370,7 +370,7 @@ reference: <testLibrary>::@function::f firstFragment: <testLibraryFragment>::@function::f formalParameters - requiredPositional x + requiredPositional hasImplicitType x type: dynamic returnType: void '''); @@ -535,7 +535,7 @@ reference: <testLibraryFragment>::@function::f enclosingElement3: <testLibraryFragment> parameters - requiredPositional final x @8 + requiredPositional final hasImplicitType x @8 type: dynamic returnType: dynamic ---------------------------------------- @@ -556,7 +556,7 @@ reference: <testLibrary>::@function::f firstFragment: <testLibraryFragment>::@function::f formalParameters - requiredPositional final x + requiredPositional final hasImplicitType x type: dynamic returnType: dynamic '''); @@ -576,7 +576,7 @@ reference: <testLibraryFragment>::@function::f enclosingElement3: <testLibraryFragment> parameters - optionalNamed default x @3 + optionalNamed default hasImplicitType x @3 reference: <testLibraryFragment>::@function::f::@parameter::x type: dynamic returnType: dynamic @@ -599,7 +599,7 @@ reference: <testLibrary>::@function::f firstFragment: <testLibraryFragment>::@function::f formalParameters - optionalNamed x + optionalNamed hasImplicitType x firstFragment: <testLibraryFragment>::@function::f::@parameter::x type: dynamic returnType: dynamic @@ -620,7 +620,7 @@ reference: <testLibraryFragment>::@function::f enclosingElement3: <testLibraryFragment> parameters - optionalPositional default x @3 + optionalPositional default hasImplicitType x @3 type: dynamic returnType: dynamic ---------------------------------------- @@ -641,7 +641,7 @@ reference: <testLibrary>::@function::f firstFragment: <testLibraryFragment>::@function::f formalParameters - optionalPositional x + optionalPositional hasImplicitType x type: dynamic returnType: dynamic '''); @@ -661,7 +661,7 @@ reference: <testLibraryFragment>::@function::f enclosingElement3: <testLibraryFragment> parameters - requiredPositional x @2 + requiredPositional hasImplicitType x @2 type: dynamic returnType: dynamic ---------------------------------------- @@ -682,7 +682,7 @@ reference: <testLibrary>::@function::f firstFragment: <testLibraryFragment>::@function::f formalParameters - requiredPositional x + requiredPositional hasImplicitType x type: dynamic returnType: dynamic '''); @@ -705,9 +705,9 @@ requiredPositional g @2 type: dynamic Function(dynamic, dynamic) parameters - requiredPositional x @4 + requiredPositional hasImplicitType x @4 type: dynamic - requiredPositional y @7 + requiredPositional hasImplicitType y @7 type: dynamic returnType: dynamic ---------------------------------------- @@ -731,9 +731,9 @@ requiredPositional g type: dynamic Function(dynamic, dynamic) formalParameters - requiredPositional x + requiredPositional hasImplicitType x type: dynamic - requiredPositional y + requiredPositional hasImplicitType y type: dynamic returnType: dynamic '''); @@ -970,9 +970,9 @@ reference: <testLibraryFragment>::@function::f enclosingElement3: <testLibraryFragment> parameters - requiredPositional x @2 + requiredPositional hasImplicitType x @2 type: dynamic - requiredPositional y @5 + requiredPositional hasImplicitType y @5 type: dynamic returnType: dynamic ---------------------------------------- @@ -995,9 +995,9 @@ reference: <testLibrary>::@function::f firstFragment: <testLibraryFragment>::@function::f formalParameters - requiredPositional x + requiredPositional hasImplicitType x type: dynamic - requiredPositional y + requiredPositional hasImplicitType y type: dynamic returnType: dynamic ''');
diff --git a/pkg/analyzer/test/src/summary/elements/top_level_variable_test.dart b/pkg/analyzer/test/src/summary/elements/top_level_variable_test.dart index 4aea29a..51fa917 100644 --- a/pkg/analyzer/test/src/summary/elements/top_level_variable_test.dart +++ b/pkg/analyzer/test/src/summary/elements/top_level_variable_test.dart
@@ -634,7 +634,7 @@ enclosingElement3: <testLibraryFragment> documentationComment: /**\n * Docs\n */ parameters - requiredPositional value @71 + requiredPositional hasImplicitType value @71 type: dynamic returnType: void ---------------------------------------- @@ -667,7 +667,7 @@ firstFragment: <testLibraryFragment>::@setter::x documentationComment: /**\n * Docs\n */ formalParameters - requiredPositional value + requiredPositional hasImplicitType value type: dynamic '''); } @@ -813,7 +813,7 @@ reference: <testLibraryFragment>::@setter::y enclosingElement3: <testLibraryFragment> parameters - requiredPositional value @31 + requiredPositional hasImplicitType value @31 type: dynamic returnType: void ---------------------------------------- @@ -864,7 +864,7 @@ static set y firstFragment: <testLibraryFragment>::@setter::y formalParameters - requiredPositional value + requiredPositional hasImplicitType value type: dynamic '''); }
diff --git a/pkg/analyzer/test/src/summary/elements/type_alias_test.dart b/pkg/analyzer/test/src/summary/elements/type_alias_test.dart index 10df462..5904982 100644 --- a/pkg/analyzer/test/src/summary/elements/type_alias_test.dart +++ b/pkg/analyzer/test/src/summary/elements/type_alias_test.dart
@@ -2,9 +2,6 @@ // 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/dart/element/element.dart'; -import 'package:analyzer/dart/element/type.dart'; -import 'package:test/test.dart'; import 'package:test_reflective_loader/test_reflective_loader.dart'; import '../../dart/resolution/node_text_expectations.dart'; @@ -609,33 +606,117 @@ var library = await buildLibrary(r''' typedef void F<T>(int a); '''); - var unit = library.definingCompilationUnit; - - var F = unit.typeAliases[0]; - expect(F.name, 'F'); - - var T = F.typeParameters[0]; - expect(T.name, 'T'); - expect(T.enclosingElement3, same(F)); - - var function = F.aliasedElement as GenericFunctionTypeElement; - expect(function.enclosingElement3, same(F)); - - var a = function.parameters[0]; - expect(a.name, 'a'); - expect(a.enclosingElement3, same(function)); + checkElementText(library, r''' +library + reference: <testLibrary> + definingUnit: <testLibraryFragment> + units + <testLibraryFragment> + enclosingElement3: <null> + typeAliases + functionTypeAliasBased F @13 + reference: <testLibraryFragment>::@typeAlias::F + typeParameters + unrelated T @15 + defaultType: dynamic + aliasedType: void Function(int) + aliasedElement: GenericFunctionTypeElement + parameters + requiredPositional a @22 + type: int + returnType: void +---------------------------------------- +library + reference: <testLibrary> + fragments + <testLibraryFragment> + element: <testLibrary> + typeAliases + F @13 + reference: <testLibraryFragment>::@typeAlias::F + element: <testLibrary>::@typeAlias::F + typeParameters + T @15 + element: <not-implemented> + typeAliases + F + firstFragment: <testLibraryFragment>::@typeAlias::F + typeParameters + T + aliasedType: void Function(int) +'''); } test_functionTypeAlias_type_element() async { var library = await buildLibrary(r''' typedef T F<T>(); -F<int> a; +void f(F<int> a) {} '''); - var unit = library.definingCompilationUnit; - var type = unit.topLevelVariables[0].type as FunctionType; - - expect(type.alias!.element, same(unit.typeAliases[0])); - _assertTypeStrings(type.alias!.typeArguments, ['int']); + checkElementText(library, r''' +library + reference: <testLibrary> + definingUnit: <testLibraryFragment> + units + <testLibraryFragment> + enclosingElement3: <null> + typeAliases + functionTypeAliasBased F @10 + reference: <testLibraryFragment>::@typeAlias::F + typeParameters + covariant T @12 + defaultType: dynamic + aliasedType: T Function() + aliasedElement: GenericFunctionTypeElement + returnType: T + functions + f @23 + reference: <testLibraryFragment>::@function::f + enclosingElement3: <testLibraryFragment> + parameters + requiredPositional a @32 + type: int Function() + alias: <testLibraryFragment>::@typeAlias::F + typeArguments + int + returnType: void +---------------------------------------- +library + reference: <testLibrary> + fragments + <testLibraryFragment> + element: <testLibrary> + typeAliases + F @10 + reference: <testLibraryFragment>::@typeAlias::F + element: <testLibrary>::@typeAlias::F + typeParameters + T @12 + element: <not-implemented> + functions + f @23 + reference: <testLibraryFragment>::@function::f + element: <testLibrary>::@function::f + formalParameters + a @32 + element: <testLibraryFragment>::@function::f::@parameter::a#element + typeAliases + F + firstFragment: <testLibraryFragment>::@typeAlias::F + typeParameters + T + aliasedType: T Function() + functions + f + reference: <testLibrary>::@function::f + firstFragment: <testLibraryFragment>::@function::f + formalParameters + requiredPositional a + type: int Function() + alias: <testLibraryFragment>::@typeAlias::F + typeArguments + int + returnType: void +'''); } test_functionTypeAlias_typeParameters_variance_contravariant() async { @@ -1201,25 +1282,47 @@ var library = await buildLibrary(r''' typedef F<T> = void Function<U>(int a); '''); - var unit = library.definingCompilationUnit; - - var F = unit.typeAliases[0]; - expect(F.name, 'F'); - - var T = F.typeParameters[0]; - expect(T.name, 'T'); - expect(T.enclosingElement3, same(F)); - - var function = F.aliasedElement as GenericFunctionTypeElement; - expect(function.enclosingElement3, same(F)); - - var U = function.typeParameters[0]; - expect(U.name, 'U'); - expect(U.enclosingElement3, same(function)); - - var a = function.parameters[0]; - expect(a.name, 'a'); - expect(a.enclosingElement3, same(function)); + checkElementText(library, r''' +library + reference: <testLibrary> + definingUnit: <testLibraryFragment> + units + <testLibraryFragment> + enclosingElement3: <null> + typeAliases + F @8 + reference: <testLibraryFragment>::@typeAlias::F + typeParameters + unrelated T @10 + defaultType: dynamic + aliasedType: void Function<U>(int) + aliasedElement: GenericFunctionTypeElement + typeParameters + covariant U @29 + parameters + requiredPositional a @36 + type: int + returnType: void +---------------------------------------- +library + reference: <testLibrary> + fragments + <testLibraryFragment> + element: <testLibrary> + typeAliases + F @8 + reference: <testLibraryFragment>::@typeAlias::F + element: <testLibrary>::@typeAlias::F + typeParameters + T @10 + element: <not-implemented> + typeAliases + F + firstFragment: <testLibraryFragment>::@typeAlias::F + typeParameters + T + aliasedType: void Function<U>(int) +'''); } test_genericTypeAlias_recursive() async { @@ -3460,13 +3563,43 @@ var library = await buildLibrary(r''' typedef void F(int a, b, [int c, d]); '''); - var F = library.definingCompilationUnit.typeAliases.single; - var function = F.aliasedElement as GenericFunctionTypeElement; - // TODO(scheglov): Use better textual presentation with all information. - expect(function.parameters[0].hasImplicitType, false); - expect(function.parameters[1].hasImplicitType, true); - expect(function.parameters[2].hasImplicitType, false); - expect(function.parameters[3].hasImplicitType, true); + checkElementText(library, r''' +library + reference: <testLibrary> + definingUnit: <testLibraryFragment> + units + <testLibraryFragment> + enclosingElement3: <null> + typeAliases + functionTypeAliasBased F @13 + reference: <testLibraryFragment>::@typeAlias::F + aliasedType: void Function(int, dynamic, [int, dynamic]) + aliasedElement: GenericFunctionTypeElement + parameters + requiredPositional a @19 + type: int + requiredPositional hasImplicitType b @22 + type: dynamic + optionalPositional c @30 + type: int + optionalPositional hasImplicitType d @33 + type: dynamic + returnType: void +---------------------------------------- +library + reference: <testLibrary> + fragments + <testLibraryFragment> + element: <testLibrary> + typeAliases + F @13 + reference: <testLibraryFragment>::@typeAlias::F + element: <testLibrary>::@typeAlias::F + typeAliases + F + firstFragment: <testLibraryFragment>::@typeAlias::F + aliasedType: void Function(int, dynamic, [int, dynamic]) +'''); } test_typedef_legacy_parameter_parameters() async { @@ -3487,9 +3620,9 @@ requiredPositional g @10 type: dynamic Function(dynamic, dynamic) parameters - requiredPositional x @12 + requiredPositional hasImplicitType x @12 type: dynamic - requiredPositional y @15 + requiredPositional hasImplicitType y @15 type: dynamic returnType: dynamic ---------------------------------------- @@ -3688,9 +3821,9 @@ aliasedType: dynamic Function(dynamic, dynamic) aliasedElement: GenericFunctionTypeElement parameters - requiredPositional x @10 + requiredPositional hasImplicitType x @10 type: dynamic - requiredPositional y @13 + requiredPositional hasImplicitType y @13 type: dynamic returnType: dynamic ---------------------------------------- @@ -3725,11 +3858,11 @@ aliasedType: dynamic Function({dynamic x, dynamic y, dynamic z}) aliasedElement: GenericFunctionTypeElement parameters - optionalNamed y @11 + optionalNamed hasImplicitType y @11 type: dynamic - optionalNamed z @14 + optionalNamed hasImplicitType z @14 type: dynamic - optionalNamed x @17 + optionalNamed hasImplicitType x @17 type: dynamic returnType: dynamic ---------------------------------------- @@ -6443,9 +6576,6 @@ void f(A a) {} '''); - var alias = library.definingCompilationUnit.typeAliases[0]; - _assertTypeStr(alias.aliasedType, 'dynamic Function()'); - checkElementText(library, r''' library reference: <testLibrary> @@ -7112,19 +7242,6 @@ returnType: dynamic '''); } - - // TODO(scheglov): This is duplicate. - void _assertTypeStr(DartType type, String expected) { - var typeStr = type.getDisplayString(); - expect(typeStr, expected); - } - - void _assertTypeStrings(List<DartType> types, List<String> expected) { - var typeStringList = types.map((e) { - return e.getDisplayString(); - }).toList(); - expect(typeStringList, expected); - } } abstract class TypeAliasElementTest_augmentation extends ElementsBaseTest {
diff --git a/pkg/analyzer/test/src/summary/elements/type_inference_test.dart b/pkg/analyzer/test/src/summary/elements/type_inference_test.dart index 893982d..ffc7030 100644 --- a/pkg/analyzer/test/src/summary/elements/type_inference_test.dart +++ b/pkg/analyzer/test/src/summary/elements/type_inference_test.dart
@@ -1792,7 +1792,7 @@ reference: <testLibraryFragment>::@class::C::@setter::x enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional value @29 + requiredPositional hasImplicitType value @29 type: dynamic returnType: void ---------------------------------------- @@ -1846,7 +1846,7 @@ set x firstFragment: <testLibraryFragment>::@class::C::@setter::x formalParameters - requiredPositional value + requiredPositional hasImplicitType value type: dynamic '''); } @@ -3552,7 +3552,7 @@ parameters requiredPositional x @47 type: int - requiredPositional g @50 + requiredPositional hasImplicitType g @50 type: int Function(U) returnType: void abstract class D @73 @@ -3653,7 +3653,7 @@ formalParameters requiredPositional x type: int - requiredPositional g + requiredPositional hasImplicitType g type: int Function(U) abstract class D reference: <testLibrary>::@class::D @@ -3722,7 +3722,7 @@ parameters requiredPositional x @50 type: int - requiredPositional g @53 + requiredPositional hasImplicitType g @53 type: int Function(String) returnType: void ---------------------------------------- @@ -3768,7 +3768,7 @@ formalParameters requiredPositional x type: int - requiredPositional g + requiredPositional hasImplicitType g type: int Function(String) '''); } @@ -3800,7 +3800,7 @@ parameters requiredPositional x @31 type: int - requiredPositional g @34 + requiredPositional hasImplicitType g @34 type: int Function(String) returnType: void abstract class D @57 @@ -3881,7 +3881,7 @@ formalParameters requiredPositional x type: int - requiredPositional g + requiredPositional hasImplicitType g type: int Function(String) abstract class D reference: <testLibrary>::@class::D @@ -4147,7 +4147,7 @@ reference: <testLibraryFragment>::@class::C::@setter::f enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional g @31 + requiredPositional hasImplicitType g @31 type: int Function(String) returnType: void abstract class D @54 @@ -4239,7 +4239,7 @@ set f firstFragment: <testLibraryFragment>::@class::C::@setter::f formalParameters - requiredPositional g + requiredPositional hasImplicitType g type: int Function(String) abstract class D reference: <testLibrary>::@class::D @@ -4302,7 +4302,7 @@ reference: <testLibraryFragment>::@class::B::@method::m enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional p @41 + requiredPositional hasImplicitType p @41 type: Stream<dynamic> returnType: dynamic ---------------------------------------- @@ -4344,7 +4344,7 @@ reference: <testLibrary>::@class::B::@method::m firstFragment: <testLibraryFragment>::@class::B::@method::m formalParameters - requiredPositional p + requiredPositional hasImplicitType p type: Stream<dynamic> '''); ClassElement b = library.definingCompilationUnit.classes[0]; @@ -5851,7 +5851,7 @@ reference: <testLibraryFragment>::@class::A::@constructor::new enclosingElement3: <testLibraryFragment>::@class::A parameters - requiredPositional final this.value @34 + requiredPositional final hasImplicitType this.value @34 type: T field: <testLibraryFragment>::@class::A::@field::value accessors @@ -5971,7 +5971,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final value + requiredPositional final hasImplicitType value type: T getters synthetic get value @@ -6046,7 +6046,7 @@ reference: <testLibraryFragment>::@class::A::@constructor::new enclosingElement3: <testLibraryFragment>::@class::A parameters - requiredPositional final this.value @34 + requiredPositional final hasImplicitType this.value @34 type: T field: <testLibraryFragment>::@class::A::@field::value accessors @@ -6240,7 +6240,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final value + requiredPositional final hasImplicitType value type: T getters synthetic get value @@ -6328,7 +6328,7 @@ reference: <testLibraryFragment>::@class::A::@constructor::new enclosingElement3: <testLibraryFragment>::@class::A parameters - requiredPositional final this.f @35 + requiredPositional final hasImplicitType this.f @35 type: int field: <testLibraryFragment>::@class::A::@field::f accessors @@ -6398,7 +6398,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional final f + requiredPositional final hasImplicitType f type: int getters synthetic get f @@ -6436,7 +6436,7 @@ reference: <testLibraryFragment>::@class::A::@constructor::new enclosingElement3: <testLibraryFragment>::@class::A parameters - requiredPositional _ @14 + requiredPositional hasImplicitType _ @14 type: dynamic topLevelVariables static final a @26 @@ -6505,7 +6505,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - requiredPositional _ + requiredPositional hasImplicitType _ type: dynamic topLevelVariables final hasInitializer a @@ -7322,7 +7322,7 @@ reference: <testLibraryFragment>::@class::C::@constructor::new enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional final this.f @85 + requiredPositional final hasImplicitType this.f @85 type: T field: <testLibraryFragment>::@class::C::@field::f accessors @@ -7444,7 +7444,7 @@ const new firstFragment: <testLibraryFragment>::@class::C::@constructor::new formalParameters - requiredPositional final f + requiredPositional final hasImplicitType f type: T getters synthetic get f
diff --git a/pkg/analyzer/test/src/summary/elements/types_test.dart b/pkg/analyzer/test/src/summary/elements/types_test.dart index 08d0ebf..31db74a 100644 --- a/pkg/analyzer/test/src/summary/elements/types_test.dart +++ b/pkg/analyzer/test/src/summary/elements/types_test.dart
@@ -1227,7 +1227,7 @@ reference: <testLibraryFragment>::@class::X1::@method::== enclosingElement3: <testLibraryFragment>::@class::X1 parameters - requiredPositional other @77 + requiredPositional hasImplicitType other @77 type: Object returnType: bool class X2 @102 @@ -1244,7 +1244,7 @@ reference: <testLibraryFragment>::@class::X2::@method::== enclosingElement3: <testLibraryFragment>::@class::X2 parameters - requiredPositional other @148 + requiredPositional hasImplicitType other @148 type: Object returnType: bool class X3 @173 @@ -1261,7 +1261,7 @@ reference: <testLibraryFragment>::@class::X3::@method::== enclosingElement3: <testLibraryFragment>::@class::X3 parameters - requiredPositional other @216 + requiredPositional hasImplicitType other @216 type: int returnType: bool ---------------------------------------- @@ -1335,7 +1335,7 @@ reference: <testLibrary>::@class::X1::@method::== firstFragment: <testLibraryFragment>::@class::X1::@method::== formalParameters - requiredPositional other + requiredPositional hasImplicitType other type: Object class X2 reference: <testLibrary>::@class::X2 @@ -1350,7 +1350,7 @@ reference: <testLibrary>::@class::X2::@method::== firstFragment: <testLibraryFragment>::@class::X2::@method::== formalParameters - requiredPositional other + requiredPositional hasImplicitType other type: Object class X3 reference: <testLibrary>::@class::X3 @@ -1365,7 +1365,7 @@ reference: <testLibrary>::@class::X3::@method::== firstFragment: <testLibraryFragment>::@class::X3::@method::== formalParameters - requiredPositional other + requiredPositional hasImplicitType other type: int '''); } @@ -2616,7 +2616,7 @@ reference: <testLibraryFragment>::@function::foo enclosingElement3: <testLibraryFragment> parameters - optionalPositional default p @39 + optionalPositional default hasImplicitType p @39 type: dynamic constantInitializer SimpleIdentifier @@ -2646,7 +2646,7 @@ reference: <testLibrary>::@function::foo firstFragment: <testLibraryFragment>::@function::foo formalParameters - optionalPositional p + optionalPositional hasImplicitType p type: dynamic returnType: dynamic '''); @@ -2678,7 +2678,7 @@ reference: <testLibraryFragment>::@function::foo enclosingElement3: <testLibraryFragment> parameters - optionalPositional default p @22 + optionalPositional default hasImplicitType p @22 type: dynamic constantInitializer SimpleIdentifier @@ -2707,7 +2707,7 @@ reference: <testLibrary>::@function::foo firstFragment: <testLibraryFragment>::@function::foo formalParameters - optionalPositional p + optionalPositional hasImplicitType p type: dynamic returnType: dynamic '''); @@ -2748,7 +2748,7 @@ reference: <testLibraryFragment>::@function::foo enclosingElement3: <testLibraryFragment> parameters - optionalPositional default p @5 + optionalPositional default hasImplicitType p @5 type: dynamic constantInitializer SimpleIdentifier @@ -2815,7 +2815,7 @@ reference: <testLibrary>::@function::foo firstFragment: <testLibraryFragment>::@function::foo formalParameters - optionalPositional p + optionalPositional hasImplicitType p type: dynamic returnType: dynamic V
diff --git a/pkg/analyzer/test/src/summary/macro_test.dart b/pkg/analyzer/test/src/summary/macro_test.dart index 9cb806e..2647faa 100644 --- a/pkg/analyzer/test/src/summary/macro_test.dart +++ b/pkg/analyzer/test/src/summary/macro_test.dart
@@ -3096,7 +3096,7 @@ periodOffset: 56 nameEnd: 62 parameters - requiredPositional final this.f @68 + requiredPositional final hasImplicitType this.f @68 type: int field: <testLibraryFragment>::@class::A::@field::f ---------------------------------------- @@ -3154,7 +3154,7 @@ named firstFragment: <testLibrary>::@fragment::package:test/test.macro.dart::@classAugmentation::A::@constructor::named formalParameters - requiredPositional final f + requiredPositional final hasImplicitType f type: int getters synthetic get f @@ -3851,7 +3851,7 @@ new firstFragment: <testLibrary>::@fragment::package:test/test.macro.dart::@classAugmentation::B::@constructor::new formalParameters - optionalPositional x + optionalPositional hasImplicitType x type: dynamic '''); } @@ -3885,7 +3885,7 @@ reference: <testLibrary>::@class::B::@method::foo firstFragment: <testLibrary>::@fragment::package:test/test.macro.dart::@classAugmentation::B::@method::foo formalParameters - optionalPositional x + optionalPositional hasImplicitType x type: dynamic '''); } @@ -3919,7 +3919,7 @@ reference: <testLibrary>::@class::B::@method::foo firstFragment: <testLibrary>::@fragment::package:test/test.macro.dart::@classAugmentation::B::@method::foo formalParameters - optionalPositional x + optionalPositional hasImplicitType x type: dynamic metadata Annotation @@ -3973,7 +3973,7 @@ reference: <testLibrary>::@class::B::@method::foo firstFragment: <testLibrary>::@fragment::package:test/test.macro.dart::@classAugmentation::B::@method::foo formalParameters - requiredPositional x + requiredPositional hasImplicitType x type: dynamic metadata Annotation @@ -4031,7 +4031,7 @@ set foo firstFragment: <testLibrary>::@fragment::package:test/test.macro.dart::@classAugmentation::B::@setter::foo formalParameters - requiredPositional x + requiredPositional hasImplicitType x type: dynamic metadata Annotation @@ -4853,7 +4853,7 @@ reference: <testLibrary>::@function::foo firstFragment: <testLibrary>::@fragment::package:test/test.macro.dart::@function::foo formalParameters - optionalPositional x + optionalPositional hasImplicitType x type: dynamic returnType: void '''); @@ -5022,7 +5022,7 @@ static set foo firstFragment: <testLibrary>::@fragment::package:test/test.macro.dart::@accessor::foo formalParameters - requiredPositional x + requiredPositional hasImplicitType x type: dynamic metadata Annotation @@ -8697,7 +8697,7 @@ reference: <testLibraryFragment>::@function::foo enclosingElement3: <testLibraryFragment> parameters - requiredPositional a @102 + requiredPositional hasImplicitType a @102 type: dynamic returnType: void macroDiagnostics @@ -8731,7 +8731,7 @@ reference: <testLibrary>::@function::foo firstFragment: <testLibraryFragment>::@function::foo formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: dynamic returnType: void ''');
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 e332e31..5dc7e56 100644 --- a/pkg/analyzer/test/src/summary/top_level_inference_test.dart +++ b/pkg/analyzer/test/src/summary/top_level_inference_test.dart
@@ -12007,7 +12007,7 @@ reference: <testLibraryFragment>::@class::A::@constructor::new enclosingElement3: <testLibraryFragment>::@class::A parameters - optionalPositional default final this.f @33 + optionalPositional default final hasImplicitType this.f @33 type: int constantInitializer SimpleStringLiteral @@ -12075,7 +12075,7 @@ new firstFragment: <testLibraryFragment>::@class::A::@constructor::new formalParameters - optionalPositional final f + optionalPositional final hasImplicitType f type: int getters synthetic get f @@ -12206,7 +12206,7 @@ reference: <testLibraryFragment>::@class::B::@setter::z enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional _ @105 + requiredPositional hasImplicitType _ @105 type: int returnType: void ---------------------------------------- @@ -12393,7 +12393,7 @@ set z firstFragment: <testLibraryFragment>::@class::B::@setter::z formalParameters - requiredPositional _ + requiredPositional hasImplicitType _ type: int '''); } @@ -12694,7 +12694,7 @@ reference: <testLibraryFragment>::@class::B::@setter::z enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional _ @108 + requiredPositional hasImplicitType _ @108 type: T returnType: void ---------------------------------------- @@ -12891,7 +12891,7 @@ set z firstFragment: <testLibraryFragment>::@class::B::@setter::z formalParameters - requiredPositional _ + requiredPositional hasImplicitType _ type: T '''); } @@ -13338,7 +13338,7 @@ reference: <testLibraryFragment>::@class::B::@setter::z enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional _ @117 + requiredPositional hasImplicitType _ @117 type: int returnType: void ---------------------------------------- @@ -13484,7 +13484,7 @@ set z firstFragment: <testLibraryFragment>::@class::B::@setter::z formalParameters - requiredPositional _ + requiredPositional hasImplicitType _ type: int '''); } @@ -13591,7 +13591,7 @@ reference: <testLibraryFragment>::@class::B::@setter::z enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional _ @120 + requiredPositional hasImplicitType _ @120 type: T returnType: void ---------------------------------------- @@ -13747,7 +13747,7 @@ set z firstFragment: <testLibraryFragment>::@class::B::@setter::z formalParameters - requiredPositional _ + requiredPositional hasImplicitType _ type: T '''); } @@ -15050,7 +15050,7 @@ reference: <testLibraryFragment>::@class::C::@setter::x enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional _ @113 + requiredPositional hasImplicitType _ @113 type: String returnType: void ---------------------------------------- @@ -15167,7 +15167,7 @@ abstract set x firstFragment: <testLibraryFragment>::@class::C::@setter::x formalParameters - requiredPositional _ + requiredPositional hasImplicitType _ type: String '''); } @@ -15651,7 +15651,7 @@ reference: <testLibraryFragment>::@class::C::@setter::x enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional _ @110 + requiredPositional hasImplicitType _ @110 type: int returnType: void ---------------------------------------- @@ -15768,7 +15768,7 @@ abstract set x firstFragment: <testLibraryFragment>::@class::C::@setter::x formalParameters - requiredPositional _ + requiredPositional hasImplicitType _ type: int '''); } @@ -15878,7 +15878,7 @@ reference: <testLibraryFragment>::@class::B::@setter::z enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional _ @141 + requiredPositional hasImplicitType _ @141 type: int returnType: void ---------------------------------------- @@ -16042,7 +16042,7 @@ set z firstFragment: <testLibraryFragment>::@class::B::@setter::z formalParameters - requiredPositional _ + requiredPositional hasImplicitType _ type: int '''); } @@ -17236,9 +17236,9 @@ reference: <testLibraryFragment>::@class::B::@method::m enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @60 + requiredPositional hasImplicitType a @60 type: int - requiredPositional b @63 + requiredPositional hasImplicitType b @63 type: dynamic returnType: void ---------------------------------------- @@ -17308,9 +17308,9 @@ reference: <testLibrary>::@class::B::@method::m firstFragment: <testLibraryFragment>::@class::B::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int - requiredPositional b + requiredPositional hasImplicitType b type: dynamic '''); } @@ -17382,7 +17382,7 @@ enclosingElement3: <testLibraryFragment>::@class::C typeInferenceError: overrideNoCombinedSuperSignature parameters - requiredPositional a @102 + requiredPositional hasImplicitType a @102 type: dynamic returnType: dynamic ---------------------------------------- @@ -17480,7 +17480,7 @@ reference: <testLibrary>::@class::C::@method::m firstFragment: <testLibraryFragment>::@class::C::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: dynamic '''); } @@ -17553,7 +17553,7 @@ enclosingElement3: <testLibraryFragment>::@class::C typeInferenceError: overrideNoCombinedSuperSignature parameters - requiredPositional x @130 + requiredPositional hasImplicitType x @130 type: dynamic returnType: Never ---------------------------------------- @@ -17649,7 +17649,7 @@ reference: <testLibrary>::@class::C::@method::foo firstFragment: <testLibraryFragment>::@class::C::@method::foo formalParameters - requiredPositional x + requiredPositional hasImplicitType x type: dynamic '''); } @@ -17873,7 +17873,7 @@ enclosingElement3: <testLibraryFragment>::@class::C typeInferenceError: overrideNoCombinedSuperSignature parameters - requiredPositional a @114 + requiredPositional hasImplicitType a @114 type: dynamic returnType: dynamic ---------------------------------------- @@ -17983,7 +17983,7 @@ reference: <testLibrary>::@class::C::@method::m firstFragment: <testLibraryFragment>::@class::C::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: dynamic '''); } @@ -18065,7 +18065,7 @@ enclosingElement3: <testLibraryFragment>::@class::C typeInferenceError: overrideNoCombinedSuperSignature parameters - requiredPositional a @121 + requiredPositional hasImplicitType a @121 type: dynamic returnType: dynamic ---------------------------------------- @@ -18178,7 +18178,7 @@ reference: <testLibrary>::@class::C::@method::m firstFragment: <testLibraryFragment>::@class::C::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: dynamic '''); } @@ -18229,9 +18229,9 @@ reference: <testLibraryFragment>::@class::B::@method::m enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @55 + requiredPositional hasImplicitType a @55 type: int - optionalNamed default b @59 + optionalNamed default hasImplicitType b @59 reference: <testLibraryFragment>::@class::B::@method::m::@parameter::b type: dynamic returnType: void @@ -18303,9 +18303,9 @@ reference: <testLibrary>::@class::B::@method::m firstFragment: <testLibraryFragment>::@class::B::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int - optionalNamed b + optionalNamed hasImplicitType b firstFragment: <testLibraryFragment>::@class::B::@method::m::@parameter::b type: dynamic '''); @@ -18357,9 +18357,9 @@ reference: <testLibraryFragment>::@class::B::@method::m enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @55 + requiredPositional hasImplicitType a @55 type: int - optionalPositional default b @59 + optionalPositional default hasImplicitType b @59 type: dynamic returnType: void ---------------------------------------- @@ -18429,9 +18429,9 @@ reference: <testLibrary>::@class::B::@method::m firstFragment: <testLibraryFragment>::@class::B::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int - optionalPositional b + optionalPositional hasImplicitType b type: dynamic '''); } @@ -18465,7 +18465,7 @@ reference: <testLibraryFragment>::@class::A::@method::m enclosingElement3: <testLibraryFragment>::@class::A parameters - requiredPositional a @14 + requiredPositional hasImplicitType a @14 type: dynamic returnType: dynamic class B @28 @@ -18482,7 +18482,7 @@ reference: <testLibraryFragment>::@class::B::@method::m enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @46 + requiredPositional hasImplicitType a @46 type: dynamic returnType: dynamic ---------------------------------------- @@ -18535,7 +18535,7 @@ reference: <testLibrary>::@class::A::@method::m firstFragment: <testLibraryFragment>::@class::A::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: dynamic class B reference: <testLibrary>::@class::B @@ -18550,7 +18550,7 @@ reference: <testLibrary>::@class::B::@method::m firstFragment: <testLibraryFragment>::@class::B::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: dynamic '''); } @@ -18601,7 +18601,7 @@ reference: <testLibraryFragment>::@class::B::@method::m enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @65 + requiredPositional hasImplicitType a @65 type: dynamic returnType: dynamic ---------------------------------------- @@ -18669,7 +18669,7 @@ reference: <testLibrary>::@class::B::@method::m firstFragment: <testLibraryFragment>::@class::B::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: dynamic '''); } @@ -18730,7 +18730,7 @@ reference: <testLibraryFragment>::@class::B::@method::m enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @50 + requiredPositional hasImplicitType a @50 type: dynamic returnType: dynamic ---------------------------------------- @@ -18816,7 +18816,7 @@ reference: <testLibrary>::@class::B::@method::m firstFragment: <testLibraryFragment>::@class::B::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: dynamic '''); } @@ -18889,7 +18889,7 @@ reference: <testLibraryFragment>::@class::C::@method::m enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional a @96 + requiredPositional hasImplicitType a @96 type: int returnType: String ---------------------------------------- @@ -18991,7 +18991,7 @@ reference: <testLibrary>::@class::C::@method::m firstFragment: <testLibraryFragment>::@class::C::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int '''); } @@ -19045,7 +19045,7 @@ reference: <testLibraryFragment>::@class::B::@method::m enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @57 + requiredPositional hasImplicitType a @57 type: int returnType: String class C @71 @@ -19062,7 +19062,7 @@ reference: <testLibraryFragment>::@class::C::@method::m enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional a @89 + requiredPositional hasImplicitType a @89 type: int returnType: String ---------------------------------------- @@ -19146,7 +19146,7 @@ reference: <testLibrary>::@class::B::@method::m firstFragment: <testLibraryFragment>::@class::B::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int class C reference: <testLibrary>::@class::C @@ -19161,7 +19161,7 @@ reference: <testLibrary>::@class::C::@method::m firstFragment: <testLibraryFragment>::@class::C::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int '''); } @@ -19215,7 +19215,7 @@ reference: <testLibraryFragment>::@class::B::@method::m enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @60 + requiredPositional hasImplicitType a @60 type: int returnType: String class C @74 @@ -19232,7 +19232,7 @@ reference: <testLibraryFragment>::@class::C::@method::m enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional a @92 + requiredPositional hasImplicitType a @92 type: int returnType: String ---------------------------------------- @@ -19315,7 +19315,7 @@ reference: <testLibrary>::@class::B::@method::m firstFragment: <testLibraryFragment>::@class::B::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int class C reference: <testLibrary>::@class::C @@ -19330,7 +19330,7 @@ reference: <testLibrary>::@class::C::@method::m firstFragment: <testLibraryFragment>::@class::C::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int '''); } @@ -19385,7 +19385,7 @@ reference: <testLibraryFragment>::@class::B::@method::m enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @69 + requiredPositional hasImplicitType a @69 type: int returnType: String class C @83 @@ -19402,7 +19402,7 @@ reference: <testLibraryFragment>::@class::C::@method::m enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional a @101 + requiredPositional hasImplicitType a @101 type: int returnType: String ---------------------------------------- @@ -19486,7 +19486,7 @@ reference: <testLibrary>::@class::B::@method::m firstFragment: <testLibraryFragment>::@class::B::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int class C reference: <testLibrary>::@class::C @@ -19501,7 +19501,7 @@ reference: <testLibrary>::@class::C::@method::m firstFragment: <testLibraryFragment>::@class::C::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int '''); } @@ -19561,9 +19561,9 @@ reference: <testLibraryFragment>::@class::B::@method::m enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @79 + requiredPositional hasImplicitType a @79 type: int - requiredPositional b @82 + requiredPositional hasImplicitType b @82 type: double returnType: String ---------------------------------------- @@ -19647,9 +19647,9 @@ reference: <testLibrary>::@class::B::@method::m firstFragment: <testLibraryFragment>::@class::B::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int - requiredPositional b + requiredPositional hasImplicitType b type: double '''); } @@ -19700,7 +19700,7 @@ reference: <testLibraryFragment>::@class::B::@method::m enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @57 + requiredPositional hasImplicitType a @57 type: int returnType: String ---------------------------------------- @@ -19768,7 +19768,7 @@ reference: <testLibrary>::@class::B::@method::m firstFragment: <testLibraryFragment>::@class::B::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int '''); } @@ -19822,9 +19822,9 @@ reference: <testLibraryFragment>::@class::B::@method::m enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @69 + requiredPositional hasImplicitType a @69 type: int - optionalNamed default b @73 + optionalNamed default hasImplicitType b @73 reference: <testLibraryFragment>::@class::B::@method::m::@parameter::b type: double returnType: String @@ -19902,9 +19902,9 @@ reference: <testLibrary>::@class::B::@method::m firstFragment: <testLibraryFragment>::@class::B::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int - optionalNamed b + optionalNamed hasImplicitType b firstFragment: <testLibraryFragment>::@class::B::@method::m::@parameter::b type: double '''); @@ -19958,9 +19958,9 @@ reference: <testLibraryFragment>::@class::B::@method::m enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @69 + requiredPositional hasImplicitType a @69 type: int - optionalPositional default b @73 + optionalPositional default hasImplicitType b @73 type: double returnType: String ---------------------------------------- @@ -20034,9 +20034,9 @@ reference: <testLibrary>::@class::B::@method::m firstFragment: <testLibraryFragment>::@class::B::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int - optionalPositional b + optionalPositional hasImplicitType b type: double '''); } @@ -20109,7 +20109,7 @@ reference: <testLibraryFragment>::@class::C::@method::m enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional a @96 + requiredPositional hasImplicitType a @96 type: int returnType: String ---------------------------------------- @@ -20211,7 +20211,7 @@ reference: <testLibrary>::@class::C::@method::m firstFragment: <testLibraryFragment>::@class::C::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int '''); } @@ -20267,7 +20267,7 @@ reference: <testLibraryFragment>::@class::B::@method::m enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @79 + requiredPositional hasImplicitType a @79 type: int returnType: String ---------------------------------------- @@ -20342,7 +20342,7 @@ reference: <testLibrary>::@class::B::@method::m firstFragment: <testLibraryFragment>::@class::B::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int '''); } @@ -20393,7 +20393,7 @@ reference: <testLibraryFragment>::@class::B::@method::m enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @67 + requiredPositional hasImplicitType a @67 type: int returnType: String ---------------------------------------- @@ -20460,7 +20460,7 @@ reference: <testLibrary>::@class::B::@method::m firstFragment: <testLibraryFragment>::@class::B::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int '''); } @@ -20533,7 +20533,7 @@ reference: <testLibraryFragment>::@class::C::@method::m enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional a @125 + requiredPositional hasImplicitType a @125 type: String returnType: int ---------------------------------------- @@ -20635,7 +20635,7 @@ reference: <testLibrary>::@class::C::@method::m firstFragment: <testLibraryFragment>::@class::C::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: String '''); } @@ -20798,7 +20798,7 @@ reference: <testLibraryFragment>::@class::B::@method::m enclosingElement3: <testLibraryFragment>::@class::B parameters - requiredPositional a @69 + requiredPositional hasImplicitType a @69 type: int returnType: String ---------------------------------------- @@ -20866,7 +20866,7 @@ reference: <testLibrary>::@class::B::@method::m firstFragment: <testLibraryFragment>::@class::B::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int '''); } @@ -20947,7 +20947,7 @@ reference: <testLibraryFragment>::@class::C::@method::m enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional a @121 + requiredPositional hasImplicitType a @121 type: int returnType: String ---------------------------------------- @@ -21060,7 +21060,7 @@ reference: <testLibrary>::@class::C::@method::m firstFragment: <testLibraryFragment>::@class::C::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int '''); } @@ -21131,7 +21131,7 @@ reference: <testLibraryFragment>::@class::C::@method::m enclosingElement3: <testLibraryFragment>::@class::C parameters - requiredPositional a @103 + requiredPositional hasImplicitType a @103 type: int returnType: String ---------------------------------------- @@ -21229,7 +21229,7 @@ reference: <testLibrary>::@class::C::@method::m firstFragment: <testLibraryFragment>::@class::C::@method::m formalParameters - requiredPositional a + requiredPositional hasImplicitType a type: int '''); }
diff --git a/pkg/analyzer/test/src/utilities/extensions/analysis_session_test.dart b/pkg/analyzer/test/src/utilities/extensions/analysis_session_test.dart deleted file mode 100644 index 93c8bc7..0000000 --- a/pkg/analyzer/test/src/utilities/extensions/analysis_session_test.dart +++ /dev/null
@@ -1,110 +0,0 @@ -// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file -// 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/dart/analysis/results.dart'; -import 'package:analyzer/dart/analysis/session.dart'; -import 'package:analyzer/dart/element/element.dart'; -import 'package:analyzer/file_system/file_system.dart'; -import 'package:analyzer/src/dart/analysis/results.dart'; -import 'package:analyzer/src/dart/element/element.dart'; -import 'package:analyzer/src/test_utilities/test_code_format.dart'; -import 'package:analyzer/src/utilities/extensions/analysis_session.dart'; -import 'package:test/test.dart'; -import 'package:test_reflective_loader/test_reflective_loader.dart'; - -import '../../dart/resolution/context_collection_resolution.dart'; - -main() { - defineReflectiveSuite(() { - defineReflectiveTests(LocateElementTest); - }); -} - -/// Tests `locateElement()` on [AnalysisSession]. -/// -/// This extension method largely delegates to `LibraryElement.locateElement` -/// which is tested more comprehensively in -/// 'test/src/utilities/extensions/library_element_test.dart'. -@reflectiveTest -class LocateElementTest extends PubPackageResolutionTest { - late _MockAnalysisSession session; - - File get testFile2 => getFile('$testPackageLibPath/test2.dart'); - - /// Find class [name] in [library]. - ClassElement findClass(LibraryElement library, String name) { - return library.definingCompilationUnit.getClass(name)!; - } - - /// Locate the element referenced by [location] in [session]. - Future<Element?> getElement(ElementLocation? location) => - session.locateElement(location!); - - @override - void setUp() { - super.setUp(); - session = _MockAnalysisSession(); - } - - void test_elementInLibrary() async { - var libraryOne = await _createLibrary(testFile, 'class C {}'); - var libraryTwo = await _createLibrary(testFile2, 'class C {}'); - var classOne = findClass(libraryOne, 'C'); - var classTwo = findClass(libraryTwo, 'C'); - - var c1 = await getElement(classOne.location!); - var c2 = await getElement(classTwo.location!); - expect(c1, classOne); - expect(c2, classTwo); - } - - void test_invalid() async { - var library = - await _createLibrary(testFile, 'class C {}', addToSession: false); - var class_ = findClass(library, 'C'); - - expect(await getElement(class_.location!), isNull); - } - - void test_library() async { - var libraryOne = await _createLibrary(testFile, 'class C {}'); - var libraryTwo = await _createLibrary(testFile2, 'class C {}'); - - expect(await getElement(libraryOne.location!), libraryOne); - expect(await getElement(libraryTwo.location!), libraryTwo); - } - - /// Create a library and (unless [addToSession] is `false`) add it to [session]. - Future<LibraryElement> _createLibrary( - File file, - String content, { - bool addToSession = true, - }) async { - var code = TestCode.parse(content); - newFile(file.path, code.code); - var library = (await resolveFile(file)).libraryElement; - if (addToSession) { - session.addLibrary(library); - } - return library; - } -} - -class _MockAnalysisSession implements AnalysisSession { - final _libraries = <String, LibraryElementImpl>{}; - - void addLibrary(LibraryElementImpl library) => - _libraries[library.identifier] = library; - - @override - Future<SomeLibraryElementResult> getLibraryByUri(String uri) async { - var library = _libraries[uri]; - return library != null - ? LibraryElementResultImpl(library) - : CannotResolveUriResult(); - } - - @override - dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); -}
diff --git a/pkg/analyzer/test/src/utilities/extensions/test_all.dart b/pkg/analyzer/test/src/utilities/extensions/test_all.dart index 2010868..7f18c3f 100644 --- a/pkg/analyzer/test/src/utilities/extensions/test_all.dart +++ b/pkg/analyzer/test/src/utilities/extensions/test_all.dart
@@ -4,7 +4,6 @@ import 'package:test_reflective_loader/test_reflective_loader.dart'; -import 'analysis_session_test.dart' as analysis_session; import 'ast_test.dart' as ast; import 'async_test.dart' as async; import 'collection_test.dart' as collection; @@ -15,7 +14,6 @@ main() { defineReflectiveSuite(() { - analysis_session.main(); ast.main(); async.main(); collection.main();
diff --git a/pkg/dev_compiler/test/hot_reload_suite.dart b/pkg/dev_compiler/test/hot_reload_suite.dart index 373692c..236bddd 100644 --- a/pkg/dev_compiler/test/hot_reload_suite.dart +++ b/pkg/dev_compiler/test/hot_reload_suite.dart
@@ -930,8 +930,10 @@ /// 'diff' can be unstable across platforms around newline offsets. (String, String) _filterLineDeltas(String diff1, String diff2) { bool isBlankLineOrDelta(String s) { - return s.trim().isEmpty || - (s.startsWith('+') || s.startsWith('-')) && s.trim().length == 1; + var trimmed = s.trim(); + return trimmed.isEmpty || + (trimmed.startsWith('+') || trimmed.startsWith('-')) && + trimmed.length == 1; } var diff1Lines = LineSplitter().convert(diff1)
diff --git a/tests/hot_reload/enum_addition/main.0.dart b/tests/hot_reload/enum_addition/main.0.dart new file mode 100644 index 0000000..d5b1b7b --- /dev/null +++ b/tests/hot_reload/enum_addition/main.0.dart
@@ -0,0 +1,27 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2085 + +enum Fruit { Apple, Banana } + +void helper() {} + +Future<void> main() async { + Expect.equals(0, Fruit.Apple.index); + Expect.equals('Fruit.Apple', Fruit.Apple.toString()); + Expect.equals(1, Fruit.Banana.index); + Expect.equals('Fruit.Banana', Fruit.Banana.toString()); + await hotReload(); + + Expect.equals(0, Fruit.Apple.index); + Expect.equals('Fruit.Apple', Fruit.Apple.toString()); + Expect.equals(2, Fruit.Banana.index); + Expect.equals('Fruit.Banana', Fruit.Banana.toString()); + helper(); +}
diff --git a/tests/hot_reload/enum_addition/main.1.dart b/tests/hot_reload/enum_addition/main.1.dart new file mode 100644 index 0000000..13686a9 --- /dev/null +++ b/tests/hot_reload/enum_addition/main.1.dart
@@ -0,0 +1,54 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2085 + +enum Fruit { Apple, Cantaloupe, Banana } + +void helper() { + Expect.equals(1, Fruit.Cantaloupe.index); + Expect.equals('Fruit.Cantaloupe', Fruit.Cantaloupe.toString()); +} + +Future<void> main() async { + Expect.equals(0, Fruit.Apple.index); + Expect.equals('Fruit.Apple', Fruit.Apple.toString()); + Expect.equals(1, Fruit.Banana.index); + Expect.equals('Fruit.Banana', Fruit.Banana.toString()); + await hotReload(); + + Expect.equals(0, Fruit.Apple.index); + Expect.equals('Fruit.Apple', Fruit.Apple.toString()); + Expect.equals(2, Fruit.Banana.index); + Expect.equals('Fruit.Banana', Fruit.Banana.toString()); + helper(); +} + +/** DIFF **/ +/* +@@ -8,9 +8,12 @@ + // Adapted from: + // https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2085 + +-enum Fruit { Apple, Banana } ++enum Fruit { Apple, Cantaloupe, Banana } + +-void helper() {} ++void helper() { ++ Expect.equals(1, Fruit.Cantaloupe.index); ++ Expect.equals('Fruit.Cantaloupe', Fruit.Cantaloupe.toString()); ++} + + Future<void> main() async { + Expect.equals(0, Fruit.Apple.index); +@@ -25,3 +28,4 @@ + Expect.equals('Fruit.Banana', Fruit.Banana.toString()); + helper(); + } ++ +*/
diff --git a/tests/hot_reload/enum_delete/main.0.dart b/tests/hot_reload/enum_delete/main.0.dart new file mode 100644 index 0000000..b7edea3 --- /dev/null +++ b/tests/hot_reload/enum_delete/main.0.dart
@@ -0,0 +1,25 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2170 + +enum Fruit { Apple, Banana, Cantaloupe } + +var x; + +Future<void> main() async { + x = Fruit.Cantaloupe; + Expect.equals('Fruit.Cantaloupe', x.toString()); + Expect.type<int>(x.hashCode); + Expect.equals(2, x.index); + await hotReload(); + + Expect.equals('Fruit.Deleted enum value from Fruit', x.toString()); + Expect.type<int>(x.hashCode); + Expect.equals(-1, x.index); +}
diff --git a/tests/hot_reload/enum_delete/main.1.dart b/tests/hot_reload/enum_delete/main.1.dart new file mode 100644 index 0000000..b2060dc --- /dev/null +++ b/tests/hot_reload/enum_delete/main.1.dart
@@ -0,0 +1,47 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2170 + +enum Fruit { Apple, Banana } + +var x; + +Future<void> main() async { + Expect.equals('Fruit.Cantaloupe', x.toString()); + Expect.type<int>(x.hashCode); + Expect.equals(2, x.index); + await hotReload(); + + Expect.equals('Fruit.Deleted enum value from Fruit', x.toString()); + Expect.type<int>(x.hashCode); + Expect.equals(-1, x.index); +} + +/** DIFF **/ +/* +@@ -8,12 +8,11 @@ + // Adapted from: + // https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2170 + +-enum Fruit { Apple, Banana, Cantaloupe } ++enum Fruit { Apple, Banana } + + var x; + + Future<void> main() async { +- x = Fruit.Cantaloupe; + Expect.equals('Fruit.Cantaloupe', x.toString()); + Expect.type<int>(x.hashCode); + Expect.equals(2, x.index); +@@ -23,3 +22,4 @@ + Expect.type<int>(x.hashCode); + Expect.equals(-1, x.index); + } ++ +*/
diff --git a/tests/hot_reload/enum_equality/main.0.dart b/tests/hot_reload/enum_equality/main.0.dart new file mode 100644 index 0000000..8eac80f --- /dev/null +++ b/tests/hot_reload/enum_equality/main.0.dart
@@ -0,0 +1,19 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L1979 + +enum Fruit { Apple, Banana } + +var x; + +Future<void> main() async { + x = Fruit.Banana; + await hotReload(); + Expect.equals(Fruit.Banana, x); +}
diff --git a/tests/hot_reload/enum_equality/main.1.dart b/tests/hot_reload/enum_equality/main.1.dart new file mode 100644 index 0000000..3614ee8 --- /dev/null +++ b/tests/hot_reload/enum_equality/main.1.dart
@@ -0,0 +1,28 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L1979 + +enum Fruit { Apple, Banana } + +var x; + +Future<void> main() async { + x = Fruit.Banana; + await hotReload(); + Expect.equals(Fruit.Banana, x); +} + +/** DIFF **/ +/* +@@ -17,3 +17,4 @@ + await hotReload(); + Expect.equals(Fruit.Banana, x); + } ++ +*/
diff --git a/tests/hot_reload/enum_identical/main.0.dart b/tests/hot_reload/enum_identical/main.0.dart new file mode 100644 index 0000000..71d5bd1 --- /dev/null +++ b/tests/hot_reload/enum_identical/main.0.dart
@@ -0,0 +1,19 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2015 + +enum Fruit { Apple, Banana } + +var x; + +Future<void> main() async { + x = Fruit.Banana; + await hotReload(); + Expect.identical(Fruit.Banana, x); +}
diff --git a/tests/hot_reload/enum_identical/main.1.dart b/tests/hot_reload/enum_identical/main.1.dart new file mode 100644 index 0000000..b591f35 --- /dev/null +++ b/tests/hot_reload/enum_identical/main.1.dart
@@ -0,0 +1,28 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2015 + +enum Fruit { Apple, Banana } + +var x; + +Future<void> main() async { + x = Fruit.Banana; + await hotReload(); + Expect.identical(Fruit.Banana, x); +} + +/** DIFF **/ +/* +@@ -17,3 +17,4 @@ + await hotReload(); + Expect.identical(Fruit.Banana, x); + } ++ +*/
diff --git a/tests/hot_reload/enum_identity_reload/main.0.dart b/tests/hot_reload/enum_identity_reload/main.0.dart new file mode 100644 index 0000000..ca5fd3a --- /dev/null +++ b/tests/hot_reload/enum_identity_reload/main.0.dart
@@ -0,0 +1,35 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2207 + +enum Fruit { Apple, Banana, Cantaloupe } + +var x, y, z, w; + +Future<void> main() async { + x = { + Fruit.Apple: Fruit.Apple.index, + Fruit.Banana: Fruit.Banana.index, + Fruit.Cantaloupe: Fruit.Cantaloupe.index, + }; + y = Fruit.Apple; + z = Fruit.Banana; + w = Fruit.Cantaloupe; + await hotReload(); + + x.forEach((fruit, index) { + Expect.identical(Fruit.values[index], fruit); + }); + Expect.equals(x[Fruit.Apple], Fruit.Apple.index); + Expect.equals(x[Fruit.Banana], Fruit.Banana.index); + Expect.equals(x[Fruit.Cantaloupe], Fruit.Cantaloupe.index); + Expect.equals(y, Fruit.values[x[Fruit.Apple]]); + Expect.equals(z, Fruit.values[x[Fruit.Banana]]); + Expect.equals(w, Fruit.values[x[Fruit.Cantaloupe]]); +}
diff --git a/tests/hot_reload/enum_identity_reload/main.1.dart b/tests/hot_reload/enum_identity_reload/main.1.dart new file mode 100644 index 0000000..ef25285 --- /dev/null +++ b/tests/hot_reload/enum_identity_reload/main.1.dart
@@ -0,0 +1,44 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2207 + +enum Fruit { Apple, Banana, Cantaloupe } + +var x, y, z, w; + +Future<void> main() async { + x = { + Fruit.Apple: Fruit.Apple.index, + Fruit.Banana: Fruit.Banana.index, + Fruit.Cantaloupe: Fruit.Cantaloupe.index, + }; + y = Fruit.Apple; + z = Fruit.Banana; + w = Fruit.Cantaloupe; + await hotReload(); + + x.forEach((fruit, index) { + Expect.identical(Fruit.values[index], fruit); + }); + Expect.equals(x[Fruit.Apple], Fruit.Apple.index); + Expect.equals(x[Fruit.Banana], Fruit.Banana.index); + Expect.equals(x[Fruit.Cantaloupe], Fruit.Cantaloupe.index); + Expect.equals(y, Fruit.values[x[Fruit.Apple]]); + Expect.equals(z, Fruit.values[x[Fruit.Banana]]); + Expect.equals(w, Fruit.values[x[Fruit.Cantaloupe]]); +} + +/** DIFF **/ +/* +@@ -33,3 +33,4 @@ + Expect.equals(z, Fruit.values[x[Fruit.Banana]]); + Expect.equals(w, Fruit.values[x[Fruit.Cantaloupe]]); + } ++ +*/
diff --git a/tests/hot_reload/enum_in_main_library_modified/main.0.dart b/tests/hot_reload/enum_in_main_library_modified/main.0.dart new file mode 100644 index 0000000..c8ee269 --- /dev/null +++ b/tests/hot_reload/enum_in_main_library_modified/main.0.dart
@@ -0,0 +1,29 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L6456 +// Regression test for https://github.com/dart-lang/sdk/issues/51835 + +enum Bar { bar } + +class Foo { + int? a; + toString() => 'foo'; +} + +helper() { + return Foo().toString(); +} + +Future<void> main() async { + Expect.equals('foo', helper()); + await hotReload(); + + // Modification of an imported library propagates to the importing library. + Expect.equals('foo', helper()); +}
diff --git a/tests/hot_reload/enum_in_main_library_modified/main.1.dart b/tests/hot_reload/enum_in_main_library_modified/main.1.dart new file mode 100644 index 0000000..28dca01 --- /dev/null +++ b/tests/hot_reload/enum_in_main_library_modified/main.1.dart
@@ -0,0 +1,47 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L6456 +// Regression test for https://github.com/dart-lang/sdk/issues/51835 + +enum Bar { bar } + +class Foo { + int? a; + String? b; + toString() => 'foo'; +} + +helper() { + return Foo().toString(); +} + +Future<void> main() async { + Expect.equals('foo', helper()); + await hotReload(); + + // Modification of an imported library propagates to the importing library. + Expect.equals('foo', helper()); +} + +/** DIFF **/ +/* +@@ -13,6 +13,7 @@ + + class Foo { + int? a; ++ String? b; + toString() => 'foo'; + } + +@@ -27,3 +28,4 @@ + // Modification of an imported library propagates to the importing library. + Expect.equals('foo', helper()); + } ++ +*/
diff --git a/tests/hot_reload/enum_referent_shape_change_add/main.0.dart b/tests/hot_reload/enum_referent_shape_change_add/main.0.dart new file mode 100644 index 0000000..eb635ae --- /dev/null +++ b/tests/hot_reload/enum_referent_shape_change_add/main.0.dart
@@ -0,0 +1,39 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2402 + +class Box { + final x; + const Box(this.x); +} + +enum Fruit { + Apple('Apple', const Box('A')), + Banana('Banana', const Box('B')), + Cherry('Cherry', const Box('C')), + Durian('Durian', const Box('D')), + Elderberry('Elderberry', const Box('E')), + Fig('Fig', const Box('F')), + Grape('Grape', const Box('G')), + Huckleberry('Huckleberry', const Box('H')), + Jackfruit('Jackfruit', const Box('J')); + + const Fruit(this.name, this.initial); + final String name; + final Box initial; +} + +var retained; + +Future<void> main() async { + retained = Fruit.Apple; + Expect.equals('Fruit.Apple', retained.toString()); + await hotReload(); + Expect.equals('Fruit.Apple', retained.toString()); +}
diff --git a/tests/hot_reload/enum_referent_shape_change_add/main.1.dart b/tests/hot_reload/enum_referent_shape_change_add/main.1.dart new file mode 100644 index 0000000..34f6f9f --- /dev/null +++ b/tests/hot_reload/enum_referent_shape_change_add/main.1.dart
@@ -0,0 +1,84 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2402 + +class Box { + final x; + final y; + final z; + const Box(this.x, this.y, this.z); +} + +enum Fruit { + Apple('Apple', const Box('A', 0, 0)), + Banana('Banana', const Box('B', 0, 0)), + Cherry('Cherry', const Box('C', 0, 0)), + Durian('Durian', const Box('D', 0, 0)), + Elderberry('Elderberry', const Box('E', 0, 0)), + Fig('Fig', const Box('F', 0, 0)), + Grape('Grape', const Box('G', 0, 0)), + Huckleberry('Huckleberry', const Box('H', 0, 0)), + Jackfruit('Jackfruit', const Box('J', 0, 0)), + Lemon('Lemon', const Box('L', 0, 0)); + + const Fruit(this.name, this.initial); + final String name; + final Box initial; +} + +var retained; + +Future<void> main() async { + retained = Fruit.Apple; + Expect.equals('Fruit.Apple', retained.toString()); + await hotReload(); + Expect.equals('Fruit.Apple', retained.toString()); +} + +/** DIFF **/ +/* +@@ -10,19 +10,22 @@ + + class Box { + final x; +- const Box(this.x); ++ final y; ++ final z; ++ const Box(this.x, this.y, this.z); + } + + enum Fruit { +- Apple('Apple', const Box('A')), +- Banana('Banana', const Box('B')), +- Cherry('Cherry', const Box('C')), +- Durian('Durian', const Box('D')), +- Elderberry('Elderberry', const Box('E')), +- Fig('Fig', const Box('F')), +- Grape('Grape', const Box('G')), +- Huckleberry('Huckleberry', const Box('H')), +- Jackfruit('Jackfruit', const Box('J')); ++ Apple('Apple', const Box('A', 0, 0)), ++ Banana('Banana', const Box('B', 0, 0)), ++ Cherry('Cherry', const Box('C', 0, 0)), ++ Durian('Durian', const Box('D', 0, 0)), ++ Elderberry('Elderberry', const Box('E', 0, 0)), ++ Fig('Fig', const Box('F', 0, 0)), ++ Grape('Grape', const Box('G', 0, 0)), ++ Huckleberry('Huckleberry', const Box('H', 0, 0)), ++ Jackfruit('Jackfruit', const Box('J', 0, 0)), ++ Lemon('Lemon', const Box('L', 0, 0)); + + const Fruit(this.name, this.initial); + final String name; +@@ -37,3 +40,4 @@ + await hotReload(); + Expect.equals('Fruit.Apple', retained.toString()); + } ++ +*/
diff --git a/tests/hot_reload/enum_reorder_identical/main.0.dart b/tests/hot_reload/enum_reorder_identical/main.0.dart new file mode 100644 index 0000000..643cbe5 --- /dev/null +++ b/tests/hot_reload/enum_reorder_identical/main.0.dart
@@ -0,0 +1,20 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2050 + +enum Fruit { Apple, Banana } + +var x; + +Future<void> main() async { + x = Fruit.Banana; + await hotReload(); + Expect.equals(Fruit.Banana, x); + Expect.identical(Fruit.Banana, x); +}
diff --git a/tests/hot_reload/enum_reorder_identical/main.1.dart b/tests/hot_reload/enum_reorder_identical/main.1.dart new file mode 100644 index 0000000..0636a05 --- /dev/null +++ b/tests/hot_reload/enum_reorder_identical/main.1.dart
@@ -0,0 +1,38 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2050 + +enum Fruit { Banana, Apple } + +var x; + +Future<void> main() async { + x = Fruit.Banana; + await hotReload(); + Expect.equals(Fruit.Banana, x); + Expect.identical(Fruit.Banana, x); +} + +/** DIFF **/ +/* +@@ -8,7 +8,7 @@ + // Adapted from: + // https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2050 + +-enum Fruit { Apple, Banana } ++enum Fruit { Banana, Apple } + + var x; + +@@ -18,3 +18,4 @@ + Expect.equals(Fruit.Banana, x); + Expect.identical(Fruit.Banana, x); + } ++ +*/
diff --git a/tests/hot_reload/enum_retained_hash/main.0.dart b/tests/hot_reload/enum_retained_hash/main.0.dart new file mode 100644 index 0000000..fc50dc2 --- /dev/null +++ b/tests/hot_reload/enum_retained_hash/main.0.dart
@@ -0,0 +1,99 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2464 + +enum A { + A1(B.B1, 1), + A2(null, 2), + A3(B.B3, 3); + + const A(this.a, this.x); + final a; + final x; +} + +enum B { + B1(C.C1), + B2(C.C2), + B3(null); + + const B(this.b); + final b; +} + +enum C { + C1(null), + C2(A.A2), + C3(A.A3); + + const C(this.c); + final c; +} + +var a1; +var a1_hash; +var a2; +var a2_hash; +var a3; +var a3_hash; +var b1; +var b1_hash; +var b2; +var b2_hash; +var b3; +var b3_hash; +var c1; +var c1_hash; +var c2; +var c2_hash; +var c3; +var c3_hash; + +Future<void> main() async { + a1 = A.A1; + a1_hash = a1.hashCode; + a2 = A.A2; + a2_hash = a2.hashCode; + a3 = A.A3; + a3_hash = a3.hashCode; + b1 = B.B1; + b1_hash = b1.hashCode; + b2 = B.B2; + b2_hash = b2.hashCode; + b3 = B.B3; + b3_hash = b3.hashCode; + c1 = C.C1; + c1_hash = c1.hashCode; + c2 = C.C2; + c2_hash = c2.hashCode; + c3 = C.C3; + c3_hash = c3.hashCode; + await hotReload(); + + Expect.identical(a1, A.A1, 'i-a1'); + Expect.equals(a1.hashCode, A.A1.hashCode, 'h-a1'); + Expect.identical(a2, A.A2, 'i-a2'); + Expect.equals(a2.hashCode, A.A2.hashCode, 'h-a2'); + Expect.identical(a3, A.A3, 'i-a3'); + Expect.equals(a3.hashCode, A.A3.hashCode, 'h-a3'); + + Expect.identical(b1, B.B1, 'i-b1'); + Expect.equals(b1.hashCode, B.B1.hashCode, 'h-b1'); + Expect.identical(b2, B.B2, 'i-b2'); + Expect.equals(b2.hashCode, B.B2.hashCode, 'h-b2'); + Expect.identical(b3, B.B3, 'i-b3'); + Expect.equals(b3.hashCode, B.B3.hashCode, 'h-b3'); + + Expect.identical(c1, C.C1, 'i-c1'); + Expect.equals(c1.hashCode, C.C1.hashCode, 'h-c1'); + Expect.identical(c2, C.C2, 'i-c2'); + Expect.equals(c2.hashCode, C.C2.hashCode, 'h-c2'); + Expect.identical(c3, C.C3, 'i-c3'); + Expect.equals(c3.hashCode, C.C3.hashCode, 'h-c3'); +}
diff --git a/tests/hot_reload/enum_retained_hash/main.1.dart b/tests/hot_reload/enum_retained_hash/main.1.dart new file mode 100644 index 0000000..257b318 --- /dev/null +++ b/tests/hot_reload/enum_retained_hash/main.1.dart
@@ -0,0 +1,140 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2464 + +enum A { + A1(B.B1), + A2(null), + A3(B.B3); + + const A(this.a); + final a; +} + +enum B { + B1(C.C1, 1), + B2(C.C2, 2), + B3(null, 3); + + const B(this.b, this.x); + final b; + final x; +} + +enum C { + C1(null), + C2(A.A2), + C3(A.A3); + + const C(this.c); + final c; +} + +var a1; +var a1_hash; +var a2; +var a2_hash; +var a3; +var a3_hash; +var b1; +var b1_hash; +var b2; +var b2_hash; +var b3; +var b3_hash; +var c1; +var c1_hash; +var c2; +var c2_hash; +var c3; +var c3_hash; + +Future<void> main() async { + a1 = A.A1; + a1_hash = a1.hashCode; + a2 = A.A2; + a2_hash = a2.hashCode; + a3 = A.A3; + a3_hash = a3.hashCode; + b1 = B.B1; + b1_hash = b1.hashCode; + b2 = B.B2; + b2_hash = b2.hashCode; + b3 = B.B3; + b3_hash = b3.hashCode; + c1 = C.C1; + c1_hash = c1.hashCode; + c2 = C.C2; + c2_hash = c2.hashCode; + c3 = C.C3; + c3_hash = c3.hashCode; + await hotReload(); + + Expect.identical(a1, A.A1, 'i-a1'); + Expect.equals(a1.hashCode, A.A1.hashCode, 'h-a1'); + Expect.identical(a2, A.A2, 'i-a2'); + Expect.equals(a2.hashCode, A.A2.hashCode, 'h-a2'); + Expect.identical(a3, A.A3, 'i-a3'); + Expect.equals(a3.hashCode, A.A3.hashCode, 'h-a3'); + + Expect.identical(b1, B.B1, 'i-b1'); + Expect.equals(b1.hashCode, B.B1.hashCode, 'h-b1'); + Expect.identical(b2, B.B2, 'i-b2'); + Expect.equals(b2.hashCode, B.B2.hashCode, 'h-b2'); + Expect.identical(b3, B.B3, 'i-b3'); + Expect.equals(b3.hashCode, B.B3.hashCode, 'h-b3'); + + Expect.identical(c1, C.C1, 'i-c1'); + Expect.equals(c1.hashCode, C.C1.hashCode, 'h-c1'); + Expect.identical(c2, C.C2, 'i-c2'); + Expect.equals(c2.hashCode, C.C2.hashCode, 'h-c2'); + Expect.identical(c3, C.C3, 'i-c3'); + Expect.equals(c3.hashCode, C.C3.hashCode, 'h-c3'); +} + +/** DIFF **/ +/* +@@ -9,22 +9,22 @@ + // https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2464 + + enum A { +- A1(B.B1, 1), +- A2(null, 2), +- A3(B.B3, 3); ++ A1(B.B1), ++ A2(null), ++ A3(B.B3); + +- const A(this.a, this.x); ++ const A(this.a); + final a; +- final x; + } + + enum B { +- B1(C.C1), +- B2(C.C2), +- B3(null); ++ B1(C.C1, 1), ++ B2(C.C2, 2), ++ B3(null, 3); + +- const B(this.b); ++ const B(this.b, this.x); + final b; ++ final x; + } + + enum C { +@@ -97,3 +97,4 @@ + Expect.identical(c3, C.C3, 'i-c3'); + Expect.equals(c3.hashCode, C.C3.hashCode, 'h-c3'); + } ++ +*/
diff --git a/tests/hot_reload/enum_shape_change/main.0.dart b/tests/hot_reload/enum_shape_change/main.0.dart new file mode 100644 index 0000000..ee2887c --- /dev/null +++ b/tests/hot_reload/enum_shape_change/main.0.dart
@@ -0,0 +1,20 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2308 + +enum Fruit { Apple, Banana } + +var retained; + +Future<void> main() async { + retained = Fruit.Apple; + Expect.equals('Fruit.Apple', retained.toString()); + await hotReload(); + Expect.equals('A', retained.initial); +}
diff --git a/tests/hot_reload/enum_shape_change/main.1.dart b/tests/hot_reload/enum_shape_change/main.1.dart new file mode 100644 index 0000000..6340883 --- /dev/null +++ b/tests/hot_reload/enum_shape_change/main.1.dart
@@ -0,0 +1,53 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2308 + +enum Fruit { + Apple('Apple', 'A'), + Banana('Banana', 'B'); + + const Fruit(this.name, this.initial); + final String name; + final String initial; +} + +var retained; + +Future<void> main() async { + retained = Fruit.Apple; + Expect.equals('Fruit.Apple', retained.toString()); + await hotReload(); + Expect.equals('A', retained.initial); +} + +/** DIFF **/ +/* +@@ -8,8 +8,15 @@ + // Adapted from: + // https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2308 + +-enum Fruit { Apple, Banana } ++enum Fruit { ++ Apple('Apple', 'A'), ++ Banana('Banana', 'B'); + ++ const Fruit(this.name, this.initial); ++ final String name; ++ final String initial; ++} ++ + var retained; + + Future<void> main() async { +@@ -18,3 +25,4 @@ + await hotReload(); + Expect.equals('A', retained.initial); + } ++ +*/
diff --git a/tests/hot_reload/enum_shape_change_add/main.0.dart b/tests/hot_reload/enum_shape_change_add/main.0.dart new file mode 100644 index 0000000..529fdc4 --- /dev/null +++ b/tests/hot_reload/enum_shape_change_add/main.0.dart
@@ -0,0 +1,22 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2339 + +enum Fruit { Apple, Banana } + +var retained; + +helper() {} + +Future<void> main() async { + retained = Fruit.Apple; + Expect.equals('Fruit.Apple', retained.toString()); + await hotReload(); + helper(); +}
diff --git a/tests/hot_reload/enum_shape_change_add/main.1.dart b/tests/hot_reload/enum_shape_change_add/main.1.dart new file mode 100644 index 0000000..a7324c7 --- /dev/null +++ b/tests/hot_reload/enum_shape_change_add/main.1.dart
@@ -0,0 +1,69 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2339 + +enum Fruit { + Apple('Apple', 'A'), + Banana('Banana', 'B'), + Cherry('Cherry', 'C'); + + const Fruit(this.name, this.initial); + final String name; + final String initial; +} + +var retained; + +helper() { + Expect.equals('A', retained.initial); + Expect.equals('A', Fruit.Apple.initial); + Expect.equals('C', Fruit.Cherry.initial); +} + +Future<void> main() async { + retained = Fruit.Apple; + Expect.equals('Fruit.Apple', retained.toString()); + await hotReload(); + helper(); +} + +/** DIFF **/ +/* +@@ -8,11 +8,23 @@ + // Adapted from: + // https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2339 + +-enum Fruit { Apple, Banana } ++enum Fruit { ++ Apple('Apple', 'A'), ++ Banana('Banana', 'B'), ++ Cherry('Cherry', 'C'); + ++ const Fruit(this.name, this.initial); ++ final String name; ++ final String initial; ++} ++ + var retained; + +-helper() {} ++helper() { ++ Expect.equals('A', retained.initial); ++ Expect.equals('A', Fruit.Apple.initial); ++ Expect.equals('C', Fruit.Cherry.initial); ++} + + Future<void> main() async { + retained = Fruit.Apple; +@@ -20,3 +32,4 @@ + await hotReload(); + helper(); + } ++ +*/
diff --git a/tests/hot_reload/enum_shape_change_remove/main.0.dart b/tests/hot_reload/enum_shape_change_remove/main.0.dart new file mode 100644 index 0000000..46171ee --- /dev/null +++ b/tests/hot_reload/enum_shape_change_remove/main.0.dart
@@ -0,0 +1,19 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2371 + +enum Fruit { Apple, Banana } + +var retained; + +Future<void> main() async { + retained = Fruit.Banana; + await hotReload(); + Expect.equals('Fruit.Deleted enum value from Fruit', retained.toString()); +}
diff --git a/tests/hot_reload/enum_shape_change_remove/main.1.dart b/tests/hot_reload/enum_shape_change_remove/main.1.dart new file mode 100644 index 0000000..db227fe --- /dev/null +++ b/tests/hot_reload/enum_shape_change_remove/main.1.dart
@@ -0,0 +1,49 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2371 + +enum Fruit { + Apple('Apple', 'A'); + + const Fruit(this.name, this.initial); + final String name; + final String initial; +} + +var retained; + +Future<void> main() async { + await hotReload(); + Expect.equals('Fruit.Deleted enum value from Fruit', retained.toString()); +} + +/** DIFF **/ +/* +@@ -8,12 +8,18 @@ + // Adapted from: + // https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2371 + +-enum Fruit { Apple, Banana } ++enum Fruit { ++ Apple('Apple', 'A'); + ++ const Fruit(this.name, this.initial); ++ final String name; ++ final String initial; ++} ++ + var retained; + + Future<void> main() async { +- retained = Fruit.Banana; + await hotReload(); + Expect.equals('Fruit.Deleted enum value from Fruit', retained.toString()); + } ++ +*/
diff --git a/tests/hot_reload/enum_to_not_enum/config.json b/tests/hot_reload/enum_to_not_enum/config.json new file mode 100644 index 0000000..1b53ad6 --- /dev/null +++ b/tests/hot_reload/enum_to_not_enum/config.json
@@ -0,0 +1,6 @@ +{ + "expectedErrors": { + "1": "Enum class cannot be redefined to be a non-enum class" + } +} +
diff --git a/tests/hot_reload/enum_to_not_enum/main.0.dart b/tests/hot_reload/enum_to_not_enum/main.0.dart new file mode 100644 index 0000000..5d2d98f --- /dev/null +++ b/tests/hot_reload/enum_to_not_enum/main.0.dart
@@ -0,0 +1,15 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2120 + +enum Fruit { Apple } + +Future<void> main() async { + await hotReload(expectRejection: true); +}
diff --git a/tests/hot_reload/enum_to_not_enum/main.1.reject.dart b/tests/hot_reload/enum_to_not_enum/main.1.reject.dart new file mode 100644 index 0000000..d7082a9 --- /dev/null +++ b/tests/hot_reload/enum_to_not_enum/main.1.reject.dart
@@ -0,0 +1,34 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2120 + +class Fruit { + final int zero = 0; +} + +Future<void> main() async { + await hotReload(expectRejection: true); +} + +/** DIFF **/ +/* +@@ -8,8 +8,11 @@ + // Adapted from: + // https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2120 + +-enum Fruit { Apple } ++class Fruit { ++ final int zero = 0; ++} + + Future<void> main() async { + await hotReload(expectRejection: true); + } ++ +*/
diff --git a/tests/hot_reload/enum_with_set/main.0.dart b/tests/hot_reload/enum_with_set/main.0.dart new file mode 100644 index 0000000..6308911 --- /dev/null +++ b/tests/hot_reload/enum_with_set/main.0.dart
@@ -0,0 +1,32 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L6537 + +enum Enum1 { + member1({Enum2.member1, Enum2.member2}), + member2({Enum2.member2}), + member3({Enum2.member1}), + member4({Enum2.member2, Enum2.member1}), + member5({Enum2.member1}), + member6({Enum2.member1}); + + const Enum1(this.set); + final Set<Enum2> set; +} + +enum Enum2 { member1, member2 } + +var retained; +helper(e) {} + +Future<void> main() async { + retained = Enum1.member4; + await hotReload(); + Expect.equals('d', helper(retained)); +}
diff --git a/tests/hot_reload/enum_with_set/main.1.dart b/tests/hot_reload/enum_with_set/main.1.dart new file mode 100644 index 0000000..dd8cfde --- /dev/null +++ b/tests/hot_reload/enum_with_set/main.1.dart
@@ -0,0 +1,79 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L6537 + +enum Enum2 { member1, member2 } + +enum Enum1 { + member1({Enum2.member1, Enum2.member2}), + member2({Enum2.member2}), + member3({Enum2.member1}), + member4({Enum2.member2, Enum2.member1}), + member5({Enum2.member1}), + member6({Enum2.member1}); + + const Enum1(this.set); + final Set<Enum2> set; +} + +var retained; +helper(e) { + return switch (e as Enum1) { + Enum1.member1 => 'a', + Enum1.member2 => 'b', + Enum1.member3 => 'c', + Enum1.member4 => 'd', + Enum1.member5 => 'e', + Enum1.member6 => 'f', + }; +} + +Future<void> main() async { + retained = Enum1.member4; + await hotReload(); + Expect.equals('d', helper(retained)); +} + +/** DIFF **/ +/* +@@ -8,6 +8,8 @@ + // Adapted from: + // https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L6537 + ++enum Enum2 { member1, member2 } ++ + enum Enum1 { + member1({Enum2.member1, Enum2.member2}), + member2({Enum2.member2}), +@@ -20,13 +22,21 @@ + final Set<Enum2> set; + } + +-enum Enum2 { member1, member2 } +- + var retained; +-helper(e) {} ++helper(e) { ++ return switch (e as Enum1) { ++ Enum1.member1 => 'a', ++ Enum1.member2 => 'b', ++ Enum1.member3 => 'c', ++ Enum1.member4 => 'd', ++ Enum1.member5 => 'e', ++ Enum1.member6 => 'f', ++ }; ++} + + Future<void> main() async { + retained = Enum1.member4; + await hotReload(); + Expect.equals('d', helper(retained)); + } ++ +*/
diff --git a/tests/hot_reload/not_enum_to_enum/config.json b/tests/hot_reload/not_enum_to_enum/config.json new file mode 100644 index 0000000..d9b48c3 --- /dev/null +++ b/tests/hot_reload/not_enum_to_enum/config.json
@@ -0,0 +1,6 @@ +{ + "expectedErrors": { + "1": "Class cannot be redefined to be a enum class" + } +} +
diff --git a/tests/hot_reload/not_enum_to_enum/main.0.dart b/tests/hot_reload/not_enum_to_enum/main.0.dart new file mode 100644 index 0000000..1519db3 --- /dev/null +++ b/tests/hot_reload/not_enum_to_enum/main.0.dart
@@ -0,0 +1,17 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2145 + +class Fruit { + final int zero = 0; +} + +Future<void> main() async { + await hotReload(expectRejection: true); +}
diff --git a/tests/hot_reload/not_enum_to_enum/main.1.reject.dart b/tests/hot_reload/not_enum_to_enum/main.1.reject.dart new file mode 100644 index 0000000..ea26c98 --- /dev/null +++ b/tests/hot_reload/not_enum_to_enum/main.1.reject.dart
@@ -0,0 +1,32 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// 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:expect/expect.dart'; +import 'package:reload_test/reload_test_utils.dart'; + +// Adapted from: +// https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2145 + +enum Fruit { Apple } + +Future<void> main() async { + await hotReload(expectRejection: true); +} + +/** DIFF **/ +/* +@@ -8,10 +8,9 @@ + // Adapted from: + // https://github.com/dart-lang/sdk/blob/be2aabd91c67f7f331c49cb74e18fe5e469f04db/runtime/vm/isolate_reload_test.cc#L2145 + +-class Fruit { +- final int zero = 0; +-} ++enum Fruit { Apple } + + Future<void> main() async { + await hotReload(expectRejection: true); + } ++ +*/
diff --git a/tools/VERSION b/tools/VERSION index aa0faab..963e883 100644 --- a/tools/VERSION +++ b/tools/VERSION
@@ -27,5 +27,5 @@ MAJOR 3 MINOR 7 PATCH 0 -PRERELEASE 298 +PRERELEASE 299 PRERELEASE_PATCH 0