Index: pkg/analysis_server/lib/src/services/correction/util.dart |
diff --git a/pkg/analysis_server/lib/src/services/correction/util.dart b/pkg/analysis_server/lib/src/services/correction/util.dart |
index 9a2a8121b96761088939997cae3fb47825b826ca..c4082fa4765f599d1158f5dad493042ce6abf6ff 100644 |
--- a/pkg/analysis_server/lib/src/services/correction/util.dart |
+++ b/pkg/analysis_server/lib/src/services/correction/util.dart |
@@ -1030,6 +1030,10 @@ class CorrectionUtils { |
*/ |
String getTypeSource(DartType type, Set<LibraryElement> librariesToImport) { |
StringBuffer sb = new StringBuffer(); |
+ // type parameter |
+ if (!_isTypeVisible(type)) { |
+ return 'dynamic'; |
+ } |
// just a Function, not FunctionTypeAliasElement |
if (type is FunctionType && type.element is! FunctionTypeAliasElement) { |
return "Function"; |