You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wasn't able to create failing test cases at first. The following
example passed just fine:
/**
* Test
*/
@decorator
class Foo {}
The comment was attached to the class declaration. However, the example in the
issue clearly showed that it doesn't work in practice.
After spending some trying to hunt down where/how the comment was
attached to the class declaration in my example, but not in the issue's
example, I remembered that recast attaches the (block?) comment to
the first statement in the body if it is the first node in the AST.
After adding something above the docblock (in this case an `import`
statement), the issue reproduced as expected.
0 commit comments