diff --git a/pkg/analyzer/lib/src/dart/element/subtype.dart b/pkg/analyzer/lib/src/dart/element/subtype.dart index 85a93876e4b..4c8850cf089 100644 --- a/pkg/analyzer/lib/src/dart/element/subtype.dart +++ b/pkg/analyzer/lib/src/dart/element/subtype.dart @@ -31,21 +31,21 @@ class SubtypeHelper { _objectNone = typeSystem.objectNone, _objectQuestion = typeSystem.objectQuestion; - /// Return `true` if [_T0] is a subtype of [_T1]. - bool isSubtypeOf(DartType _T0, DartType _T1) { + /// Return `true` if [T0_] is a subtype of [T1_]. + bool isSubtypeOf(DartType T0_, DartType T1_) { // Reflexivity: if `T0` and `T1` are the same type then `T0 <: T1`. - if (identical(_T0, _T1)) { + if (identical(T0_, T1_)) { return true; } // `_` is treated as a top and a bottom type during inference. - if (identical(_T0, UnknownInferredType.instance) || - identical(_T1, UnknownInferredType.instance)) { + if (identical(T0_, UnknownInferredType.instance) || + identical(T1_, UnknownInferredType.instance)) { return true; } - var T0 = _T0 as TypeImpl; - var T1 = _T1 as TypeImpl; + var T0 = T0_ as TypeImpl; + var T1 = T1_ as TypeImpl; var T1_nullability = T1.nullabilitySuffix; var T0_nullability = T0.nullabilitySuffix; diff --git a/pkg/analyzer/lib/src/summary/flat_buffers.dart b/pkg/analyzer/lib/src/summary/flat_buffers.dart index 49a74004a27..80ba07c88a2 100644 --- a/pkg/analyzer/lib/src/summary/flat_buffers.dart +++ b/pkg/analyzer/lib/src/summary/flat_buffers.dart @@ -467,20 +467,20 @@ class Builder { _currentVTable!.addField(field, _tail); } - static void _setFloat64AtTail(ByteData _buf, int tail, double x) { - _buf.setFloat64(_buf.lengthInBytes - tail, x, Endian.little); + static void _setFloat64AtTail(ByteData buf, int tail, double x) { + buf.setFloat64(buf.lengthInBytes - tail, x, Endian.little); } - static void _setInt32AtTail(ByteData _buf, int tail, int x) { - _buf.setInt32(_buf.lengthInBytes - tail, x, Endian.little); + static void _setInt32AtTail(ByteData buf, int tail, int x) { + buf.setInt32(buf.lengthInBytes - tail, x, Endian.little); } - static void _setUint32AtTail(ByteData _buf, int tail, int x) { - _buf.setUint32(_buf.lengthInBytes - tail, x, Endian.little); + static void _setUint32AtTail(ByteData buf, int tail, int x) { + buf.setUint32(buf.lengthInBytes - tail, x, Endian.little); } - static void _setUint8AtTail(ByteData _buf, int tail, int x) { - _buf.setUint8(_buf.lengthInBytes - tail, x); + static void _setUint8AtTail(ByteData buf, int tail, int x) { + buf.setUint8(buf.lengthInBytes - tail, x); } } diff --git a/pkg/analyzer/lib/src/summary/format.dart b/pkg/analyzer/lib/src/summary/format.dart index e85a5697fac..fcbf6a9909d 100644 --- a/pkg/analyzer/lib/src/summary/format.dart +++ b/pkg/analyzer/lib/src/summary/format.dart @@ -241,24 +241,24 @@ abstract class _AnalysisDriverExceptionContextMixin implements idl.AnalysisDriverExceptionContext { @override Map toJson() { - Map _result = {}; + Map result = {}; var local_exception = exception; if (local_exception != '') { - _result["exception"] = local_exception; + result["exception"] = local_exception; } var local_files = files; if (local_files.isNotEmpty) { - _result["files"] = local_files.map((_value) => _value.toJson()).toList(); + result["files"] = local_files.map((value) => value.toJson()).toList(); } var local_path = path; if (local_path != '') { - _result["path"] = local_path; + result["path"] = local_path; } var local_stackTrace = stackTrace; if (local_stackTrace != '') { - _result["stackTrace"] = local_stackTrace; + result["stackTrace"] = local_stackTrace; } - return _result; + return result; } @override @@ -367,16 +367,16 @@ abstract class _AnalysisDriverExceptionFileMixin implements idl.AnalysisDriverExceptionFile { @override Map toJson() { - Map _result = {}; + Map result = {}; var local_content = content; if (local_content != '') { - _result["content"] = local_content; + result["content"] = local_content; } var local_path = path; if (local_path != '') { - _result["path"] = local_path; + result["path"] = local_path; } - return _result; + return result; } @override @@ -512,17 +512,16 @@ abstract class _AnalysisDriverResolvedUnitMixin implements idl.AnalysisDriverResolvedUnit { @override Map toJson() { - Map _result = {}; + Map result = {}; var local_errors = errors; if (local_errors.isNotEmpty) { - _result["errors"] = - local_errors.map((_value) => _value.toJson()).toList(); + result["errors"] = local_errors.map((value) => value.toJson()).toList(); } var local_index = index; if (local_index != null) { - _result["index"] = local_index.toJson(); + result["index"] = local_index.toJson(); } - return _result; + return result; } @override @@ -634,16 +633,16 @@ abstract class _AnalysisDriverSubtypeMixin implements idl.AnalysisDriverSubtype { @override Map toJson() { - Map _result = {}; + Map result = {}; var local_members = members; if (local_members.isNotEmpty) { - _result["members"] = local_members; + result["members"] = local_members; } var local_name = name; if (local_name != 0) { - _result["name"] = local_name; + result["name"] = local_name; } - return _result; + return result; } @override @@ -859,33 +858,33 @@ abstract class _AnalysisDriverUnitErrorMixin implements idl.AnalysisDriverUnitError { @override Map toJson() { - Map _result = {}; + Map result = {}; var local_contextMessages = contextMessages; if (local_contextMessages.isNotEmpty) { - _result["contextMessages"] = - local_contextMessages.map((_value) => _value.toJson()).toList(); + result["contextMessages"] = + local_contextMessages.map((value) => value.toJson()).toList(); } var local_correction = correction; if (local_correction != '') { - _result["correction"] = local_correction; + result["correction"] = local_correction; } var local_length = length; if (local_length != 0) { - _result["length"] = local_length; + result["length"] = local_length; } var local_message = message; if (local_message != '') { - _result["message"] = local_message; + result["message"] = local_message; } var local_offset = offset; if (local_offset != 0) { - _result["offset"] = local_offset; + result["offset"] = local_offset; } var local_uniqueName = uniqueName; if (local_uniqueName != '') { - _result["uniqueName"] = local_uniqueName; + result["uniqueName"] = local_uniqueName; } - return _result; + return result; } @override @@ -1711,96 +1710,95 @@ abstract class _AnalysisDriverUnitIndexMixin implements idl.AnalysisDriverUnitIndex { @override Map toJson() { - Map _result = {}; + Map result = {}; var local_elementKinds = elementKinds; if (local_elementKinds.isNotEmpty) { - _result["elementKinds"] = local_elementKinds - .map((_value) => _value.toString().split('.')[1]) + result["elementKinds"] = local_elementKinds + .map((value) => value.toString().split('.')[1]) .toList(); } var local_elementNameClassMemberIds = elementNameClassMemberIds; if (local_elementNameClassMemberIds.isNotEmpty) { - _result["elementNameClassMemberIds"] = local_elementNameClassMemberIds; + result["elementNameClassMemberIds"] = local_elementNameClassMemberIds; } var local_elementNameParameterIds = elementNameParameterIds; if (local_elementNameParameterIds.isNotEmpty) { - _result["elementNameParameterIds"] = local_elementNameParameterIds; + result["elementNameParameterIds"] = local_elementNameParameterIds; } var local_elementNameUnitMemberIds = elementNameUnitMemberIds; if (local_elementNameUnitMemberIds.isNotEmpty) { - _result["elementNameUnitMemberIds"] = local_elementNameUnitMemberIds; + result["elementNameUnitMemberIds"] = local_elementNameUnitMemberIds; } var local_elementUnits = elementUnits; if (local_elementUnits.isNotEmpty) { - _result["elementUnits"] = local_elementUnits; + result["elementUnits"] = local_elementUnits; } var local_nullStringId = nullStringId; if (local_nullStringId != 0) { - _result["nullStringId"] = local_nullStringId; + result["nullStringId"] = local_nullStringId; } var local_strings = strings; if (local_strings.isNotEmpty) { - _result["strings"] = local_strings; + result["strings"] = local_strings; } var local_subtypes = subtypes; if (local_subtypes.isNotEmpty) { - _result["subtypes"] = - local_subtypes.map((_value) => _value.toJson()).toList(); + result["subtypes"] = + local_subtypes.map((value) => value.toJson()).toList(); } var local_supertypes = supertypes; if (local_supertypes.isNotEmpty) { - _result["supertypes"] = local_supertypes; + result["supertypes"] = local_supertypes; } var local_unitLibraryUris = unitLibraryUris; if (local_unitLibraryUris.isNotEmpty) { - _result["unitLibraryUris"] = local_unitLibraryUris; + result["unitLibraryUris"] = local_unitLibraryUris; } var local_unitUnitUris = unitUnitUris; if (local_unitUnitUris.isNotEmpty) { - _result["unitUnitUris"] = local_unitUnitUris; + result["unitUnitUris"] = local_unitUnitUris; } var local_usedElementIsQualifiedFlags = usedElementIsQualifiedFlags; if (local_usedElementIsQualifiedFlags.isNotEmpty) { - _result["usedElementIsQualifiedFlags"] = - local_usedElementIsQualifiedFlags; + result["usedElementIsQualifiedFlags"] = local_usedElementIsQualifiedFlags; } var local_usedElementKinds = usedElementKinds; if (local_usedElementKinds.isNotEmpty) { - _result["usedElementKinds"] = local_usedElementKinds - .map((_value) => _value.toString().split('.')[1]) + result["usedElementKinds"] = local_usedElementKinds + .map((value) => value.toString().split('.')[1]) .toList(); } var local_usedElementLengths = usedElementLengths; if (local_usedElementLengths.isNotEmpty) { - _result["usedElementLengths"] = local_usedElementLengths; + result["usedElementLengths"] = local_usedElementLengths; } var local_usedElementOffsets = usedElementOffsets; if (local_usedElementOffsets.isNotEmpty) { - _result["usedElementOffsets"] = local_usedElementOffsets; + result["usedElementOffsets"] = local_usedElementOffsets; } var local_usedElements = usedElements; if (local_usedElements.isNotEmpty) { - _result["usedElements"] = local_usedElements; + result["usedElements"] = local_usedElements; } var local_usedNameIsQualifiedFlags = usedNameIsQualifiedFlags; if (local_usedNameIsQualifiedFlags.isNotEmpty) { - _result["usedNameIsQualifiedFlags"] = local_usedNameIsQualifiedFlags; + result["usedNameIsQualifiedFlags"] = local_usedNameIsQualifiedFlags; } var local_usedNameKinds = usedNameKinds; if (local_usedNameKinds.isNotEmpty) { - _result["usedNameKinds"] = local_usedNameKinds - .map((_value) => _value.toString().split('.')[1]) + result["usedNameKinds"] = local_usedNameKinds + .map((value) => value.toString().split('.')[1]) .toList(); } var local_usedNameOffsets = usedNameOffsets; if (local_usedNameOffsets.isNotEmpty) { - _result["usedNameOffsets"] = local_usedNameOffsets; + result["usedNameOffsets"] = local_usedNameOffsets; } var local_usedNames = usedNames; if (local_usedNames.isNotEmpty) { - _result["usedNames"] = local_usedNames; + result["usedNames"] = local_usedNames; } - return _result; + return result; } @override @@ -2499,110 +2497,110 @@ class _AvailableDeclarationImpl extends Object abstract class _AvailableDeclarationMixin implements idl.AvailableDeclaration { @override Map toJson() { - Map _result = {}; + Map result = {}; var local_children = children; if (local_children.isNotEmpty) { - _result["children"] = - local_children.map((_value) => _value.toJson()).toList(); + result["children"] = + local_children.map((value) => value.toJson()).toList(); } var local_codeLength = codeLength; if (local_codeLength != 0) { - _result["codeLength"] = local_codeLength; + result["codeLength"] = local_codeLength; } var local_codeOffset = codeOffset; if (local_codeOffset != 0) { - _result["codeOffset"] = local_codeOffset; + result["codeOffset"] = local_codeOffset; } var local_defaultArgumentListString = defaultArgumentListString; if (local_defaultArgumentListString != '') { - _result["defaultArgumentListString"] = local_defaultArgumentListString; + result["defaultArgumentListString"] = local_defaultArgumentListString; } var local_defaultArgumentListTextRanges = defaultArgumentListTextRanges; if (local_defaultArgumentListTextRanges.isNotEmpty) { - _result["defaultArgumentListTextRanges"] = + result["defaultArgumentListTextRanges"] = local_defaultArgumentListTextRanges; } var local_docComplete = docComplete; if (local_docComplete != '') { - _result["docComplete"] = local_docComplete; + result["docComplete"] = local_docComplete; } var local_docSummary = docSummary; if (local_docSummary != '') { - _result["docSummary"] = local_docSummary; + result["docSummary"] = local_docSummary; } var local_fieldMask = fieldMask; if (local_fieldMask != 0) { - _result["fieldMask"] = local_fieldMask; + result["fieldMask"] = local_fieldMask; } var local_isAbstract = isAbstract; if (local_isAbstract != false) { - _result["isAbstract"] = local_isAbstract; + result["isAbstract"] = local_isAbstract; } var local_isConst = isConst; if (local_isConst != false) { - _result["isConst"] = local_isConst; + result["isConst"] = local_isConst; } var local_isDeprecated = isDeprecated; if (local_isDeprecated != false) { - _result["isDeprecated"] = local_isDeprecated; + result["isDeprecated"] = local_isDeprecated; } var local_isFinal = isFinal; if (local_isFinal != false) { - _result["isFinal"] = local_isFinal; + result["isFinal"] = local_isFinal; } var local_isStatic = isStatic; if (local_isStatic != false) { - _result["isStatic"] = local_isStatic; + result["isStatic"] = local_isStatic; } var local_kind = kind; if (local_kind != idl.AvailableDeclarationKind.CLASS) { - _result["kind"] = local_kind.toString().split('.')[1]; + result["kind"] = local_kind.toString().split('.')[1]; } var local_locationOffset = locationOffset; if (local_locationOffset != 0) { - _result["locationOffset"] = local_locationOffset; + result["locationOffset"] = local_locationOffset; } var local_locationStartColumn = locationStartColumn; if (local_locationStartColumn != 0) { - _result["locationStartColumn"] = local_locationStartColumn; + result["locationStartColumn"] = local_locationStartColumn; } var local_locationStartLine = locationStartLine; if (local_locationStartLine != 0) { - _result["locationStartLine"] = local_locationStartLine; + result["locationStartLine"] = local_locationStartLine; } var local_name = name; if (local_name != '') { - _result["name"] = local_name; + result["name"] = local_name; } var local_parameterNames = parameterNames; if (local_parameterNames.isNotEmpty) { - _result["parameterNames"] = local_parameterNames; + result["parameterNames"] = local_parameterNames; } var local_parameters = parameters; if (local_parameters != '') { - _result["parameters"] = local_parameters; + result["parameters"] = local_parameters; } var local_parameterTypes = parameterTypes; if (local_parameterTypes.isNotEmpty) { - _result["parameterTypes"] = local_parameterTypes; + result["parameterTypes"] = local_parameterTypes; } var local_relevanceTags = relevanceTags; if (local_relevanceTags.isNotEmpty) { - _result["relevanceTags"] = local_relevanceTags; + result["relevanceTags"] = local_relevanceTags; } var local_requiredParameterCount = requiredParameterCount; if (local_requiredParameterCount != 0) { - _result["requiredParameterCount"] = local_requiredParameterCount; + result["requiredParameterCount"] = local_requiredParameterCount; } var local_returnType = returnType; if (local_returnType != '') { - _result["returnType"] = local_returnType; + result["returnType"] = local_returnType; } var local_typeParameters = typeParameters; if (local_typeParameters != '') { - _result["typeParameters"] = local_typeParameters; + result["typeParameters"] = local_typeParameters; } - return _result; + return result; } @override @@ -2900,38 +2898,37 @@ class _AvailableFileImpl extends Object abstract class _AvailableFileMixin implements idl.AvailableFile { @override Map toJson() { - Map _result = {}; + Map result = {}; var local_declarations = declarations; if (local_declarations.isNotEmpty) { - _result["declarations"] = - local_declarations.map((_value) => _value.toJson()).toList(); + result["declarations"] = + local_declarations.map((value) => value.toJson()).toList(); } var local_directiveInfo = directiveInfo; if (local_directiveInfo != null) { - _result["directiveInfo"] = local_directiveInfo.toJson(); + result["directiveInfo"] = local_directiveInfo.toJson(); } var local_exports = exports; if (local_exports.isNotEmpty) { - _result["exports"] = - local_exports.map((_value) => _value.toJson()).toList(); + result["exports"] = local_exports.map((value) => value.toJson()).toList(); } var local_isLibrary = isLibrary; if (local_isLibrary != false) { - _result["isLibrary"] = local_isLibrary; + result["isLibrary"] = local_isLibrary; } var local_isLibraryDeprecated = isLibraryDeprecated; if (local_isLibraryDeprecated != false) { - _result["isLibraryDeprecated"] = local_isLibraryDeprecated; + result["isLibraryDeprecated"] = local_isLibraryDeprecated; } var local_lineStarts = lineStarts; if (local_lineStarts.isNotEmpty) { - _result["lineStarts"] = local_lineStarts; + result["lineStarts"] = local_lineStarts; } var local_parts = parts; if (local_parts.isNotEmpty) { - _result["parts"] = local_parts; + result["parts"] = local_parts; } - return _result; + return result; } @override @@ -3057,17 +3054,17 @@ class _AvailableFileExportImpl extends Object abstract class _AvailableFileExportMixin implements idl.AvailableFileExport { @override Map toJson() { - Map _result = {}; + Map result = {}; var local_combinators = combinators; if (local_combinators.isNotEmpty) { - _result["combinators"] = - local_combinators.map((_value) => _value.toJson()).toList(); + result["combinators"] = + local_combinators.map((value) => value.toJson()).toList(); } var local_uri = uri; if (local_uri != '') { - _result["uri"] = local_uri; + result["uri"] = local_uri; } - return _result; + return result; } @override @@ -3194,16 +3191,16 @@ abstract class _AvailableFileExportCombinatorMixin implements idl.AvailableFileExportCombinator { @override Map toJson() { - Map _result = {}; + Map result = {}; var local_hides = hides; if (local_hides.isNotEmpty) { - _result["hides"] = local_hides; + result["hides"] = local_hides; } var local_shows = shows; if (local_shows.isNotEmpty) { - _result["shows"] = local_shows; + result["shows"] = local_shows; } - return _result; + return result; } @override @@ -3340,17 +3337,16 @@ class _CiderUnitErrorsImpl extends Object abstract class _CiderUnitErrorsMixin implements idl.CiderUnitErrors { @override Map toJson() { - Map _result = {}; + Map result = {}; var local_errors = errors; if (local_errors.isNotEmpty) { - _result["errors"] = - local_errors.map((_value) => _value.toJson()).toList(); + result["errors"] = local_errors.map((value) => value.toJson()).toList(); } var local_signature = signature; if (local_signature.isNotEmpty) { - _result["signature"] = local_signature; + result["signature"] = local_signature; } - return _result; + return result; } @override @@ -3524,28 +3520,28 @@ class _DiagnosticMessageImpl extends Object abstract class _DiagnosticMessageMixin implements idl.DiagnosticMessage { @override Map toJson() { - Map _result = {}; + Map result = {}; var local_filePath = filePath; if (local_filePath != '') { - _result["filePath"] = local_filePath; + result["filePath"] = local_filePath; } var local_length = length; if (local_length != 0) { - _result["length"] = local_length; + result["length"] = local_length; } var local_message = message; if (local_message != '') { - _result["message"] = local_message; + result["message"] = local_message; } var local_offset = offset; if (local_offset != 0) { - _result["offset"] = local_offset; + result["offset"] = local_offset; } var local_url = url; if (local_url != '') { - _result["url"] = local_url; + result["url"] = local_url; } - return _result; + return result; } @override @@ -3672,16 +3668,16 @@ class _DirectiveInfoImpl extends Object abstract class _DirectiveInfoMixin implements idl.DirectiveInfo { @override Map toJson() { - Map _result = {}; + Map result = {}; var local_templateNames = templateNames; if (local_templateNames.isNotEmpty) { - _result["templateNames"] = local_templateNames; + result["templateNames"] = local_templateNames; } var local_templateValues = templateValues; if (local_templateValues.isNotEmpty) { - _result["templateValues"] = local_templateValues; + result["templateValues"] = local_templateValues; } - return _result; + return result; } @override @@ -3762,12 +3758,12 @@ class _PackageBundleImpl extends Object abstract class _PackageBundleMixin implements idl.PackageBundle { @override Map toJson() { - Map _result = {}; + Map result = {}; var local_fake = fake; if (local_fake != 0) { - _result["fake"] = local_fake; + result["fake"] = local_fake; } - return _result; + return result; } @override diff --git a/pkg/analyzer/lib/src/summary2/data_reader.dart b/pkg/analyzer/lib/src/summary2/data_reader.dart index e72e9471adf..9c1988ddcc5 100644 --- a/pkg/analyzer/lib/src/summary2/data_reader.dart +++ b/pkg/analyzer/lib/src/summary2/data_reader.dart @@ -242,7 +242,7 @@ class _StringTable { } } - static String _decodeWtf8(Uint8List _bytes, int start, int end) { + static String _decodeWtf8(Uint8List bytes, int start, int end) { // WTF-8 decoder that trusts its input, meaning that the correctness of // the code depends on the bytes from start to end being valid and // complete WTF-8. Instead of masking off the control bits from every @@ -252,28 +252,28 @@ class _StringTable { int i = start; int j = 0; while (i < end) { - int byte = _bytes[i++]; + int byte = bytes[i++]; if (byte < 0x80) { // ASCII. charCodes[j++] = byte; } else if (byte < 0xE0) { // Two-byte sequence (11-bit unicode value). - int byte2 = _bytes[i++]; + int byte2 = bytes[i++]; int value = (byte << 6) ^ byte2 ^ 0x3080; assert(value >= 0x80 && value < 0x800); charCodes[j++] = value; } else if (byte < 0xF0) { // Three-byte sequence (16-bit unicode value). - int byte2 = _bytes[i++]; - int byte3 = _bytes[i++]; + int byte2 = bytes[i++]; + int byte3 = bytes[i++]; int value = (byte << 12) ^ (byte2 << 6) ^ byte3 ^ 0xE2080; assert(value >= 0x800 && value < 0x10000); charCodes[j++] = value; } else { // Four-byte sequence (non-BMP unicode value). - int byte2 = _bytes[i++]; - int byte3 = _bytes[i++]; - int byte4 = _bytes[i++]; + int byte2 = bytes[i++]; + int byte3 = bytes[i++]; + int byte4 = bytes[i++]; int value = (byte << 18) ^ (byte2 << 12) ^ (byte3 << 6) ^ byte4 ^ 0x3C82080; assert(value >= 0x10000 && value < 0x110000); diff --git a/pkg/analyzer/test/src/dart/analysis/context_locator_test.dart b/pkg/analyzer/test/src/dart/analysis/context_locator_test.dart index 31462c1d507..efbf9533f2b 100644 --- a/pkg/analyzer/test/src/dart/analysis/context_locator_test.dart +++ b/pkg/analyzer/test/src/dart/analysis/context_locator_test.dart @@ -1507,14 +1507,14 @@ analyzer: _assertAnalyzedFiles(root, pathList); } - void _assertBasicWorkspace(Workspace _workspace, String posixRoot) { - var workspace = _workspace as BasicWorkspace; + void _assertBasicWorkspace(Workspace workspace, String posixRoot) { + workspace as BasicWorkspace; var root = convertPath(posixRoot); expect(workspace.root, root); } - void _assertBazelWorkspace(Workspace _workspace, String posixRoot) { - var workspace = _workspace as BazelWorkspace; + void _assertBazelWorkspace(Workspace workspace, String posixRoot) { + workspace as BazelWorkspace; var root = convertPath(posixRoot); expect(workspace.root, root); } @@ -1526,8 +1526,8 @@ analyzer: } } - void _assertPubWorkspace(Workspace _workspace, String posixRoot) { - var workspace = _workspace as PubWorkspace; + void _assertPubWorkspace(Workspace workspace, String posixRoot) { + workspace as PubWorkspace; var root = convertPath(posixRoot); expect(workspace.root, root); } diff --git a/pkg/analyzer/tool/summary/generate.dart b/pkg/analyzer/tool/summary/generate.dart index b18c0956dee..981e0cf6fba 100644 --- a/pkg/analyzer/tool/summary/generate.dart +++ b/pkg/analyzer/tool/summary/generate.dart @@ -1069,12 +1069,12 @@ class _MixinGenerator extends _BaseGenerator { if (convertItem == null) { convertField = localName; } else if (type.isList) { - convertField = '$localName.map((_value) =>' - ' ${convertItem('_value')}).toList()'; + convertField = '$localName.map((value) =>' + ' ${convertItem('value')}).toList()'; } else { convertField = convertItem(localName); } - return '_result[${quoted(name)}] = $convertField'; + return 'result[${quoted(name)}] = $convertField'; } void writeConditionalStatement(String condition, String statement) { @@ -1087,7 +1087,7 @@ class _MixinGenerator extends _BaseGenerator { out('@override'); out('Map toJson() {'); indent(() { - out('Map _result = {};'); + out('Map result = {};'); indent(() { for (idl_model.FieldDeclaration field in cls.fields) { @@ -1099,7 +1099,7 @@ class _MixinGenerator extends _BaseGenerator { } }); - out('return _result;'); + out('return result;'); }); out('}'); out();