senchalabs / jsduck

Simple JavaScript Duckumentation generator.
http://docs.sencha.com/
GNU General Public License v3.0
1.5k stars 238 forks source link

@protected is not copied by @inheritdoc #603

Closed Krinkle closed 1 year ago

Krinkle commented 9 years ago

Overriding a method with @protected in a subclass and giving the subclass' method @inheritdoc, doesn't seem to copy the visibility.

inherit_members.rb does have logic pertaining to copying visibility, but not sure if resolve_visibility applies to this scenario. I think that's only used for auto-inherited members, not explicit ones.

/**
 * @class Foo
 */
function Foo() {}

/**
 * Walking.
 *
 * @param {number} x
 */
Foo.prototype.walk = function (x) {
};

/**
 * Dancing.
 *
 * @protected
 * @param {string} y
 */
Foo.prototype.dance = function (y) {
};

/**
 * Sitting.
 *
 * @private
 * @param {Object} z
 */
Foo.prototype.sit = function (z) {
};

/**
 * @class FooBar
 * @extends Foo
 */
function FooBar() {}
OO.inheritClass( FooBar, Foo );

/**
 * @inheritdoc
 */
FooBar.prototype.dance = function (y) {
};