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

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

Issue 2799093007: Issue 29288. When infer new FunctionType, makes its FunctionElement own its ParameterElement(s). (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | pkg/analyzer/test/generated/strong_mode_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/type_system.dart
diff --git a/pkg/analyzer/lib/src/generated/type_system.dart b/pkg/analyzer/lib/src/generated/type_system.dart
index dc1fec6e525f50b7b9fc52c5445383e53d12a5ed..75a56d37a072282ff6fcfadbed15d70149851534 100644
--- a/pkg/analyzer/lib/src/generated/type_system.dart
+++ b/pkg/analyzer/lib/src/generated/type_system.dart
@@ -622,10 +622,8 @@ class StrongTypeSystemImpl extends TypeSystem {
// Also pass dynamicIsBottom, because this is a fuzzy arrow.
var newType = _substituteForUnknownType(p.type,
lowerBound: !lowerBound, dynamicIsBottom: true);
- return identical(p.type, newType) && p is ParameterElementImpl
- ? p
- : new ParameterElementImpl.synthetic(
- p.name, newType, p.parameterKind);
+ return new ParameterElementImpl.synthetic(
+ p.name, newType, p.parameterKind);
});
// Return type is covariant.
var newReturnType =
@@ -639,7 +637,7 @@ class StrongTypeSystemImpl extends TypeSystem {
..isSynthetic = true
..returnType = newReturnType
..shareTypeParameters(type.typeFormals)
- ..shareParameters(newParameters);
+ ..parameters = newParameters;
return function.type = new FunctionTypeImpl(function);
}
return type;
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/strong_mode_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698