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

Unified Diff: utils/dartdoc/dartdoc.dart

Issue 8888002: Fix displaying generic types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/dartdoc/dartdoc.dart
diff --git a/utils/dartdoc/dartdoc.dart b/utils/dartdoc/dartdoc.dart
index 2eb9ec34b1440360d223604c0c554cd8bca18c16..3de0b4eafc504dac26a66c0e6a2b85a60ba5f3e3 100644
--- a/utils/dartdoc/dartdoc.dart
+++ b/utils/dartdoc/dartdoc.dart
@@ -626,7 +626,12 @@ linkToType(Type enclosingType, Type type) {
}
// Link to the type.
- write(a(typeUrl(type), type.name));
+ if (type.genericType === type) {
+ write(a(typeUrl(type), type.name));
+ } else {
+ // It's generic so don't write the <...> here.
+ write(a(typeUrl(type), type.genericType.name));
Jennifer Messerly 2011/12/08 02:19:12 I'd just use: write(a(typeUrl(type), type.gene
+ }
// See if it's a generic type.
if (type.isGeneric) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698