File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,6 @@ lib/src/error/must_call_super_verifier.dart
117117lib/src/error/nullable_dereference_verifier.dart
118118lib/src/error/override_verifier.dart
119119lib/src/error/required_parameters_verifier.dart
120- lib/src/error/super_formal_parameters_verifier.dart
121120lib/src/error/type_arguments_verifier.dart
122121lib/src/error/unused_local_elements_verifier.dart
123122lib/src/error/use_result_verifier.dart
Original file line number Diff line number Diff line change 22// for details. All rights reserved. Use of this source code is governed by a
33// BSD-style license that can be found in the LICENSE file.
44
5- import 'package:analyzer/dart/ast/ast.dart' ;
65import 'package:analyzer/error/listener.dart' ;
6+ import 'package:analyzer/src/dart/ast/ast.dart' ;
77import 'package:analyzer/src/dart/ast/extensions.dart' ;
8- import 'package:analyzer/src/dart/element/element.dart' ;
98import 'package:analyzer/src/error/codes.dart' ;
109
1110VerifySuperFormalParametersResult verifySuperFormalParameters ({
@@ -16,11 +15,13 @@ VerifySuperFormalParametersResult verifySuperFormalParameters({
1615 var result = VerifySuperFormalParametersResult ();
1716 for (var parameter in constructor.parameters.parameters) {
1817 parameter = parameter.notDefault;
19- if (parameter is SuperFormalParameter ) {
20- var parameterElement =
21- parameter.declaredElement as SuperFormalParameterElementImpl ;
18+ if (parameter is SuperFormalParameterImpl ) {
19+ var declaredFragment = parameter.declaredFragment! ;
2220 if (parameter.isNamed) {
23- result.namedArgumentNames.add (parameterElement.name);
21+ var name = declaredFragment.name2;
22+ if (name != null ) {
23+ result.namedArgumentNames.add (name);
24+ }
2425 } else {
2526 result.positionalArgumentCount++ ;
2627 if (hasExplicitPositionalArguments) {
You can’t perform that action at this time.
0 commit comments