make first node in a class body inherit class comments

This commit is contained in:
Sebastian McKenzie
2014-12-18 16:28:13 +11:00
parent 2a742b5fac
commit 5ab891b39d

View File

@@ -82,6 +82,8 @@ Class.prototype.run = function () {
this.buildBody();
t.inheritsComments(body[0], this.node);
if (this.closure) {
if (body.length === 1) {
// only a constructor so no need for a closure container