Skip to content

Commit 19cac1c

Browse files
scheglovCommit Queue
authored andcommitted
Elements. Remove 'normalParameterNames' and 'optionalParameterNames' from FunctionType.
Change-Id: I934dca9f635411b71add032a3fc607dddf7de11a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393362 Reviewed-by: Phil Quitslund <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
1 parent 0ed2082 commit 19cac1c

File tree

4 files changed

+1
-24
lines changed

4 files changed

+1
-24
lines changed

pkg/analyzer/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* Remove deprecated `source_resource.dart`.
3535
* Remove `MultiplyInheritedExecutableElement`.
3636
* Remove `AnalyzeFunctionBodiesPredicate`.
37+
* Remove `normalParameterNames` and `optionalParameterNames` from `FunctionType`.
3738

3839
## 6.11.0
3940
* Un-deprecated `LibraryElement.exportedLibraries`.

pkg/analyzer/lib/dart/element/type.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -247,21 +247,13 @@ abstract class FunctionType
247247
/// named parameters declared, then the map will be empty.
248248
Map<String, DartType> get namedParameterTypes;
249249

250-
/// The names of the required positional parameters of this type of function,
251-
/// not necessarily in the order that the parameters appear.
252-
List<String> get normalParameterNames;
253-
254250
/// A list containing the types of the normal parameters of this type of
255251
/// function.
256252
///
257253
/// The parameter types are not necessarily in the same order as they appear
258254
/// in the declaration of the function.
259255
List<DartType> get normalParameterTypes;
260256

261-
/// The names of the optional positional parameters of this type of function,
262-
/// not necessarily in the order that the parameters appear.
263-
List<String> get optionalParameterNames;
264-
265257
/// A map from the names of optional (positional) parameters to the types of
266258
/// the optional parameters of this type of function.
267259
///

pkg/analyzer/lib/src/dart/element/type.dart

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -199,22 +199,10 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType {
199199
parameter.name: parameter.type
200200
};
201201

202-
@override
203-
List<String> get normalParameterNames => parameters
204-
.where((p) => p.isRequiredPositional)
205-
.map((p) => p.name)
206-
.toList();
207-
208202
@override
209203
List<DartType> get normalParameterTypes =>
210204
positionalParameterTypes.sublist(0, requiredPositionalParameterCount);
211205

212-
@override
213-
List<String> get optionalParameterNames => parameters
214-
.where((p) => p.isOptionalPositional)
215-
.map((p) => p.name)
216-
.toList();
217-
218206
@override
219207
List<DartType> get optionalParameterTypes =>
220208
positionalParameterTypes.sublist(requiredPositionalParameterCount);

pkg/analyzer/test/src/dart/element/function_type_test.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,8 @@ class FunctionTypeTest extends AbstractTypeSystemTest {
5050
// FunctionType properties
5151
expect(f.namedParameterTypes, namedParameterTypes,
5252
reason: 'namedParameterTypes');
53-
expect(f.normalParameterNames, normalParameterNames,
54-
reason: 'normalParameterNames');
5553
expect(f.normalParameterTypes, normalParameterTypes,
5654
reason: 'normalParameterTypes');
57-
expect(f.optionalParameterNames, optionalParameterNames,
58-
reason: 'optionalParameterNames');
5955
expect(f.optionalParameterTypes, optionalParameterTypes,
6056
reason: 'optionalParameterTypes');
6157
expect(f.parameters, parameters, reason: 'parameters');

0 commit comments

Comments
 (0)