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

Unified Diff: pkg/analyzer/lib/src/task/strong/checker.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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/src/task/strong/checker.dart
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
index 29857b009340d6eebebdc988fec351bc84374f6c..19899b59d1a0e07baebae948900a6dfebdadae8f 100644
--- a/pkg/analyzer/lib/src/task/strong/checker.dart
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -129,14 +129,9 @@ class CodeChecker extends RecursiveAstVisitor {
Expression arg = list[i];
ParameterElement element = arg.staticParameterElement;
if (element == null) {
- if (type.parameters.length < len) {
- // We found an argument mismatch, the analyzer will report this too,
- // so no need to insert an error for this here.
- continue;
- }
- element = type.parameters[i];
- // TODO(vsm): When can this happen?
- assert(element != null);
+ // We found an argument mismatch, the analyzer will report this too,
+ // so no need to insert an error for this here.
+ continue;
}
DartType expectedType = _elementType(element);
if (expectedType == null) expectedType = DynamicTypeImpl.instance;
« no previous file with comments | « pkg/analyzer/lib/src/generated/static_type_analyzer.dart ('k') | pkg/analyzer/test/src/task/strong/checker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698