Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 1936873002: Warn about @deprecated positional parameters (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/hint_code_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/hint_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698