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

Unified Diff: pkg/analysis_server/lib/src/services/correction/util.dart

Issue 672013002: Issue 21375. Fix for FunctionTypeAliasElement-based FunctionType source. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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/analysis_server/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d0078aefdf4e15ca36de4e5b8a171c2342ee4693..3bf24eb4ac59a18711e16d9bf50694628c441b4e 100644
--- a/pkg/analysis_server/lib/src/services/correction/util.dart
+++ b/pkg/analysis_server/lib/src/services/correction/util.dart
@@ -888,8 +888,8 @@ class CorrectionUtils {
*/
String getTypeSource(DartType type) {
StringBuffer sb = new StringBuffer();
- // just some Function, maybe find Function Type Alias later
- if (type is FunctionType) {
+ // just a Function, not FunctionTypeAliasElement
+ if (type is FunctionType && type.element is! FunctionTypeAliasElement) {
return "Function";
}
// prepare element
@@ -912,9 +912,8 @@ class CorrectionUtils {
String name = element.displayName;
sb.write(name);
// may be type arguments
- if (type is InterfaceType) {
- InterfaceType interfaceType = type;
- List<DartType> arguments = interfaceType.typeArguments;
+ if (type is ParameterizedType) {
+ List<DartType> arguments = type.typeArguments;
// check if has arguments
bool hasArguments = false;
for (DartType argument in arguments) {
« no previous file with comments | « no previous file | pkg/analysis_server/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698