Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Issues with JSDoc types missing braces. #25

Open
jgiles opened this issue Jul 27, 2014 · 0 comments
Open

Issues with JSDoc types missing braces. #25

jgiles opened this issue Jul 27, 2014 · 0 comments
Labels

Comments

@jgiles
Copy link
Contributor

jgiles commented Jul 27, 2014

The Closure compiler apparently accepts JSDoc like this:

/**
 * Immutable empty node list.
 * @constructor
 * @extends goog.ds.BasicNodeList
 */
goog.ds.EmptyNodeList = function() {

Example taken from the annotation documentation

goog.ds.BasicNodeList is not contained in braces.

Doctrine doesn't seem to like this, and does not populate the type field for that extends tag.

@jgiles jgiles added the bug label Jul 27, 2014
jgiles added a commit that referenced this issue Jul 27, 2014
This eliminates an issue where because of missing braces in a typed tag,
the type of the previously processed tag could be used for the current
tag. See #25.

This was causing a crash in a case where an @extend was missing braces,
and the previous tag was a constructor argument with the same type as
the constructor itself, so that the class was set up as its own
superclass... eventually leading to a stack overflow. This corner case
has prevented my effective use of this plugin at work.

This is by far the worst I have ever been bitten by JS variable scoping.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant