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

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

Issue 1579503005: fix #25409, error if a generic method argument did not have a corresponding parameter (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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/lib/src/generated/static_type_analyzer.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/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
(...skipping 9830 matching lines...) Expand 10 before | Expand all | Expand 10 after
9841 9841
9842 /** 9842 /**
9843 * Given an [argumentList] and the [parameters] related to the element that 9843 * Given an [argumentList] and the [parameters] related to the element that
9844 * will be invoked using those arguments, compute the list of parameters that 9844 * will be invoked using those arguments, compute the list of parameters that
9845 * correspond to the list of arguments. 9845 * correspond to the list of arguments.
9846 * 9846 *
9847 * An error will be reported to [onError] if any of the arguments cannot be 9847 * An error will be reported to [onError] if any of the arguments cannot be
9848 * matched to a parameter. onError can be null to ignore the error. 9848 * matched to a parameter. onError can be null to ignore the error.
9849 * 9849 *
9850 * The flag [reportAsError] should be `true` if a compile-time error should be 9850 * The flag [reportAsError] should be `true` if a compile-time error should be
9851 * reported; or `false` if a compile-time warning should be reported 9851 * reported; or `false` if a compile-time warning should be reported.
9852 * 9852 *
9853 * Returns the parameters that correspond to the arguments. 9853 * Returns the parameters that correspond to the arguments. If no parameter
9854 * matched an argument, that position will be `null` in the list.
9854 */ 9855 */
9855 static List<ParameterElement> resolveArgumentsToParameters( 9856 static List<ParameterElement> resolveArgumentsToParameters(
9856 ArgumentList argumentList, 9857 ArgumentList argumentList,
9857 List<ParameterElement> parameters, 9858 List<ParameterElement> parameters,
9858 void onError(ErrorCode errorCode, AstNode node, [List<Object> arguments]), 9859 void onError(ErrorCode errorCode, AstNode node, [List<Object> arguments]),
9859 {bool reportAsError: false}) { 9860 {bool reportAsError: false}) {
9860 List<ParameterElement> requiredParameters = new List<ParameterElement>(); 9861 List<ParameterElement> requiredParameters = new List<ParameterElement>();
9861 List<ParameterElement> positionalParameters = new List<ParameterElement>(); 9862 List<ParameterElement> positionalParameters = new List<ParameterElement>();
9862 HashMap<String, ParameterElement> namedParameters = 9863 HashMap<String, ParameterElement> namedParameters =
9863 new HashMap<String, ParameterElement>(); 9864 new HashMap<String, ParameterElement>();
(...skipping 3740 matching lines...) Expand 10 before | Expand all | Expand 10 after
13604 nonFields.add(node); 13605 nonFields.add(node);
13605 return null; 13606 return null;
13606 } 13607 }
13607 13608
13608 @override 13609 @override
13609 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); 13610 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this);
13610 13611
13611 @override 13612 @override
13612 Object visitWithClause(WithClause node) => null; 13613 Object visitWithClause(WithClause node) => null;
13613 } 13614 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/static_type_analyzer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698