| Index: lib/dartdoc/mirrors/mirrors_util.dart
|
| diff --git a/lib/dartdoc/mirrors/mirrors_util.dart b/lib/dartdoc/mirrors/mirrors_util.dart
|
| index 727d5cb6c91759dbbff770346299d526e67c1953..091555376a593d2937073a9b3789840dc8f3bb6d 100644
|
| --- a/lib/dartdoc/mirrors/mirrors_util.dart
|
| +++ b/lib/dartdoc/mirrors/mirrors_util.dart
|
| @@ -14,11 +14,10 @@
|
| * Returns an iterable over the type declarations directly inheriting from
|
| * the declaration of this type.
|
| */
|
| -Iterable<InterfaceMirror> computeSubdeclarations(MirrorSystem system,
|
| - InterfaceMirror type) {
|
| +Iterable<InterfaceMirror> computeSubdeclarations(InterfaceMirror type) {
|
| type = type.declaration;
|
| var subtypes = <InterfaceMirror>[];
|
| - system.libraries().forEach((_, library) {
|
| + type.system.libraries().forEach((_, library) {
|
| for (InterfaceMirror otherType in library.types().getValues()) {
|
| var superClass = otherType.superclass();
|
| if (superClass !== null) {
|
| @@ -70,3 +69,13 @@ Mirror findMirror(Map<Object,Mirror> map, String name,
|
| });
|
| return foundMirror;
|
| }
|
| +
|
| +LibraryMirror findLibrary(MemberMirror member) {
|
| + ObjectMirror owner = member.surroundingDeclaration();
|
| + if (owner is LibraryMirror) {
|
| + return owner;
|
| + } else if (owner is TypeMirror) {
|
| + return owner.library();
|
| + }
|
| + throw new Exception('Unexpected owner: ${owner}');
|
| +}
|
|
|