What is the expected behavior for missing subclass JSDoc or @inheritDoc?

In the following example I will see the documentation for "bool" when I hit "View > Quick Documentation" over foo.bool, but I will not see it for bar.bool or baz.bool.  Is this expected?

    /**
     * The base class.
     *
     * @class
     * @constructor
     */
    function Foo() {
        /**
         * The "bool" field.
         *
         * @type {boolean}
         */
        this.bool = true;
    }


    /**
     * The sub class.
     *
     * @class
     * @extends Foo
     * @constructor
     */
    function Bar() {
        this.bool = false;
    }


    /**
     * Another sub class.
     *
     * @class
     * @extends Foo
     * @constructor
     */
    function Baz() {
        /**
         * @inheritDoc
         */
        this.bool = false;
    }


    var foo = new Foo();
    window.console.log(foo.bool);


    var bar = new Bar();
    window.console.log(bar.bool);


    var baz = new Baz();
    window.console.log(baz.bool);

1 comment

Hi Mark,
Base field documentation must be shown only when @inheritDoc tag is specified. I've created an issue (http://youtrack.jetbrains.com/issue/WEB-7864).

Thanks for reporting!

0

Please sign in to leave a comment.