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

Unified Diff: pkg/docgen/lib/docgen.dart

Issue 22962007: Checks if a mirror is a typedef mirror first. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/lib/docgen.dart
diff --git a/pkg/docgen/lib/docgen.dart b/pkg/docgen/lib/docgen.dart
index a6d67ab171e5db452b6e55d9b536b9a1b2b6a587..b2568dff81b442f8789ac0500330b753377c6037 100644
--- a/pkg/docgen/lib/docgen.dart
+++ b/pkg/docgen/lib/docgen.dart
@@ -741,20 +741,7 @@ class ClassGroup {
void addClass(ClassMirror mirror) {
_currentClass = mirror;
- var clazz = _class(mirror);
-
- // Adding inherited parent variables and methods.
- clazz.parent().forEach((parent) {
- if (_isVisible(clazz)) {
- parent.addSubclass(clazz);
- }
- });
-
- clazz.ensureComments();
-
- if (clazz.isError()) {
- errors[mirror.simpleName] = clazz;
- } else if (mirror.isTypedef) {
+ if (mirror.isTypedef) {
if (_includePrivate || !mirror.isPrivate) {
entityMap[mirror.qualifiedName] = new Typedef(mirror.simpleName,
mirror.value.returnType.qualifiedName, _commentToHtml(mirror),
@@ -763,10 +750,25 @@ class ClassGroup {
mirror.owner.qualifiedName);
typedefs[mirror.simpleName] = entityMap[mirror.qualifiedName];
}
- } else if (mirror.isClass) {
- classes[mirror.simpleName] = clazz;
} else {
- throw new ArgumentError('${mirror.simpleName} - no class type match. ');
+ var clazz = _class(mirror);
+
+ // Adding inherited parent variables and methods.
+ clazz.parent().forEach((parent) {
+ if (_isVisible(clazz)) {
+ parent.addSubclass(clazz);
+ }
+ });
+
+ clazz.ensureComments();
+
+ if (clazz.isError()) {
+ errors[mirror.simpleName] = clazz;
+ } else if (mirror.isClass) {
+ classes[mirror.simpleName] = clazz;
+ } else {
+ throw new ArgumentError('${mirror.simpleName} - no class type match. ');
+ }
}
}
« 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