| Index: pkg/docgen/lib/docgen.dart
|
| diff --git a/pkg/docgen/lib/docgen.dart b/pkg/docgen/lib/docgen.dart
|
| index 0482da1e5f89481ec77fdaa27c615b2e7d9bb58c..7bfc4b9b50f7c2ecbfe5e6721ee6c627f34f0111 100644
|
| --- a/pkg/docgen/lib/docgen.dart
|
| +++ b/pkg/docgen/lib/docgen.dart
|
| @@ -1502,9 +1502,13 @@ String docName(DeclarationMirror m) {
|
| }
|
| var owner = m.owner;
|
| if (owner == null) return m.qualifiedName;
|
| - // For the unnamed constructor we just return the class name.
|
| - if (m.simpleName == '') return docName(owner);
|
| - return docName(owner) + '.' + m.simpleName;
|
| + var simpleName = m.simpleName;
|
| + if (m is MethodMirror && m.isConstructor) {
|
| + // We name constructors specially -- including the class name again and a
|
| + // "-" to separate the constructor from its name (if any).
|
| + simpleName = '${owner.simpleName}-$simpleName';
|
| + }
|
| + return docName(owner) + '.' + simpleName;
|
| }
|
|
|
| /// Remove statics from the map of inherited items before adding them.
|
|
|