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

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

Issue 23181004: Allowed for public classes to inherit from private superclasses (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 75fb5ef1b80a20a1fed1ebb984c6cdc0af20aba6..b4709db101e47aa6fa39daaf33c7f19843357e83 100644
--- a/pkg/docgen/lib/docgen.dart
+++ b/pkg/docgen/lib/docgen.dart
@@ -469,7 +469,7 @@ Map<String, Variable> _variables(Map<String, VariableMirror> mirrorMap) {
MethodGroup _methods(Map<String, MethodMirror> mirrorMap) {
var group = new MethodGroup();
mirrorMap.forEach((String mirrorName, MethodMirror mirror) {
- if (_includePrivate || !_isHidden(mirror)) {
+ if (_includePrivate || !mirror.isPrivate) {
group.addMethod(mirror);
}
});
@@ -492,11 +492,8 @@ Class _class(ClassMirror mirror) {
_methods(mirror.methods), _annotations(mirror), _generics(mirror),
mirror.qualifiedName, _isHidden(mirror), mirror.owner.qualifiedName,
mirror.isAbstract);
- if (superclass != null)
- clazz.addInherited(superclass);
- interfaces.forEach((interface) {
- clazz.addInherited(interface);
- });
+ if (superclass != null) clazz.addInherited(superclass);
+ interfaces.forEach((interface) => clazz.addInherited(interface));
entityMap[mirror.qualifiedName] = clazz;
}
return clazz;
@@ -711,9 +708,7 @@ class Class extends Indexable {
*/
void addInherited(Class superclass) {
inheritedVariables.addAll(superclass.inheritedVariables);
- if (_isVisible(superclass)) {
- inheritedVariables.addAll(superclass.variables);
- }
+ inheritedVariables.addAll(superclass.variables);
inheritedMethods.addInherited(superclass);
}
@@ -1025,15 +1020,13 @@ class MethodGroup {
void addInherited(Class parent) {
setters.addAll(parent.inheritedMethods.setters);
+ setters.addAll(parent.methods.setters);
getters.addAll(parent.inheritedMethods.getters);
+ getters.addAll(parent.methods.getters);
operators.addAll(parent.inheritedMethods.operators);
+ operators.addAll(parent.methods.operators);
regularMethods.addAll(parent.inheritedMethods.regularMethods);
- if (_isVisible(parent)) {
- setters.addAll(parent.methods.setters);
- getters.addAll(parent.methods.getters);
- operators.addAll(parent.methods.operators);
- regularMethods.addAll(parent.methods.regularMethods);
- }
+ regularMethods.addAll(parent.methods.regularMethods);
}
Map toMap() => {
« 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