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

Unified Diff: pkg/analyzer/lib/src/generated/static_type_analyzer.dart

Issue 2779003004: Don't disable downward inference inside initializers used for top-level inference. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/static_type_analyzer.dart
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index 0c8a6c6d979d8510cab718a3ccf54b766ac63ac4..633385c13f30da53109042fe70b5f8f53300d978 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -1934,11 +1934,7 @@ class StaticTypeAnalyzer extends SimpleAstVisitor<Object> {
fnType is FunctionType &&
fnType.typeFormals.isNotEmpty &&
ts is StrongTypeSystemImpl) {
- if (_resolver.isTopLevelInference) {
- if (fnType.typeParameters.isNotEmpty) {
- return null;
- }
- } // Get the parameters that correspond to the uninstantiated generic.
+ // Get the parameters that correspond to the uninstantiated generic.
List<ParameterElement> rawParameters = ResolverVisitor
.resolveArgumentsToParameters(argumentList, fnType.parameters, null);
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698