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

Unified Diff: pkg/docgen/lib/src/models/method.dart

Issue 243483005: pkg/docgen: fixed type references within typedef doc comments (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: removed unused import Created 6 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
Index: pkg/docgen/lib/src/models/method.dart
diff --git a/pkg/docgen/lib/src/models/method.dart b/pkg/docgen/lib/src/models/method.dart
index 08a03a5418f10efe73ef98ed63ca991961e58ac5..c43a26abc7f2cd2627c597c5e5daa4d4708abd56 100644
--- a/pkg/docgen/lib/src/models/method.dart
+++ b/pkg/docgen/lib/src/models/method.dart
@@ -21,7 +21,7 @@ import 'parameter.dart';
/// A class containing properties of a Dart method.
-class Method extends OwnedIndexable {
+class Method extends OwnedIndexable<MethodMirror> {
/// Parameters for this method.
final Map<String, Parameter> parameters;
@@ -83,7 +83,7 @@ class Method extends OwnedIndexable {
}
String get docName {
- if ((mirror as MethodMirror).isConstructor) {
+ if (mirror.isConstructor) {
// We name constructors specially -- including the class name again and a
// "-" to separate the constructor from its name (if any).
return '${owner.docName}.${dart2js_util.nameOf(mirror.owner)}-'
@@ -124,11 +124,10 @@ class Method extends OwnedIndexable {
};
String get typeName {
- MethodMirror theMirror = mirror;
- if (theMirror.isConstructor) return 'constructor';
- if (theMirror.isGetter) return 'getter';
- if (theMirror.isSetter) return 'setter';
- if (theMirror.isOperator) return 'operator';
+ if (mirror.isConstructor) return 'constructor';
+ if (mirror.isGetter) return 'getter';
+ if (mirror.isSetter) return 'setter';
+ if (mirror.isOperator) return 'operator';
return 'method';
}

Powered by Google App Engine
This is Rietveld 408576698