| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analyzer.src.generated.resolver; | 5 library analyzer.src.generated.resolver; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 * @param errorReporter the error reporter | 87 * @param errorReporter the error reporter |
| 88 */ | 88 */ |
| 89 BestPracticesVerifier( | 89 BestPracticesVerifier( |
| 90 this._errorReporter, TypeProvider typeProvider, this._currentLibrary, | 90 this._errorReporter, TypeProvider typeProvider, this._currentLibrary, |
| 91 {TypeSystem typeSystem}) | 91 {TypeSystem typeSystem}) |
| 92 : _futureNullType = typeProvider.futureNullType, | 92 : _futureNullType = typeProvider.futureNullType, |
| 93 _typeSystem = typeSystem ?? new TypeSystemImpl(); | 93 _typeSystem = typeSystem ?? new TypeSystemImpl(); |
| 94 | 94 |
| 95 @override | 95 @override |
| 96 Object visitArgumentList(ArgumentList node) { | 96 Object visitArgumentList(ArgumentList node) { |
| 97 for (Expression argument in node.arguments) { |
| 98 ParameterElement parameter = argument.bestParameterElement; |
| 99 if (parameter?.parameterKind == ParameterKind.POSITIONAL) { |
| 100 _checkForDeprecatedMemberUse(parameter, argument); |
| 101 } |
| 102 } |
| 97 _checkForArgumentTypesNotAssignableInList(node); | 103 _checkForArgumentTypesNotAssignableInList(node); |
| 98 return super.visitArgumentList(node); | 104 return super.visitArgumentList(node); |
| 99 } | 105 } |
| 100 | 106 |
| 101 @override | 107 @override |
| 102 Object visitAsExpression(AsExpression node) { | 108 Object visitAsExpression(AsExpression node) { |
| 103 _checkForUnnecessaryCast(node); | 109 _checkForUnnecessaryCast(node); |
| 104 return super.visitAsExpression(node); | 110 return super.visitAsExpression(node); |
| 105 } | 111 } |
| 106 | 112 |
| (...skipping 10776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10883 return null; | 10889 return null; |
| 10884 } | 10890 } |
| 10885 if (identical(node.staticElement, variable)) { | 10891 if (identical(node.staticElement, variable)) { |
| 10886 if (node.inSetterContext()) { | 10892 if (node.inSetterContext()) { |
| 10887 result = true; | 10893 result = true; |
| 10888 } | 10894 } |
| 10889 } | 10895 } |
| 10890 return null; | 10896 return null; |
| 10891 } | 10897 } |
| 10892 } | 10898 } |
| OLD | NEW |