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

Unified Diff: pkg/analyzer/lib/src/task/strong_mode.dart

Issue 1364353003: [analyzer] copy generic type args when inferring a new function type for an ExecutableElement (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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_mode.dart
diff --git a/pkg/analyzer/lib/src/task/strong_mode.dart b/pkg/analyzer/lib/src/task/strong_mode.dart
index 0c53dad08256ede52c81be4c971fb256a8573e4a..f8cb97f6e8964224c15fbab6d0fdc2a9993c3bae 100644
--- a/pkg/analyzer/lib/src/task/strong_mode.dart
+++ b/pkg/analyzer/lib/src/task/strong_mode.dart
@@ -28,7 +28,8 @@ void setParameterType(PropertyAccessorElement element, DartType type) {
FunctionType functionType = element.type;
if (functionType is FunctionTypeImpl) {
element.type =
- new FunctionTypeImpl(element, functionType.prunedTypedefs);
+ new FunctionTypeImpl(element, functionType.prunedTypedefs)
+ ..typeArguments = functionType.typeArguments;
Jennifer Messerly 2015/09/24 22:35:56 not sure if y'all use cascades, let me know if the
Brian Wilkerson 2015/09/24 22:49:27 I haven't gotten in the habit of using them much,
} else {
assert(false);
}
@@ -53,7 +54,8 @@ void setReturnType(ExecutableElement element, DartType type) {
element.returnType = type;
FunctionType functionType = element.type;
if (functionType is FunctionTypeImpl) {
- element.type = new FunctionTypeImpl(element, functionType.prunedTypedefs);
+ element.type = new FunctionTypeImpl(element, functionType.prunedTypedefs)
+ ..typeArguments = functionType.typeArguments;
} else {
assert(false);
}
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/strong_mode_test.dart » ('j') | pkg/analyzer/test/src/task/strong_mode_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698