From 5ab891b39d3e3c00a1fe23805597bab03e068fe1 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Thu, 18 Dec 2014 16:28:13 +1100 Subject: [PATCH] make first node in a class body inherit class comments --- lib/6to5/transformation/transformers/es6-classes.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/6to5/transformation/transformers/es6-classes.js b/lib/6to5/transformation/transformers/es6-classes.js index 6363138079..f43f522f60 100644 --- a/lib/6to5/transformation/transformers/es6-classes.js +++ b/lib/6to5/transformation/transformers/es6-classes.js @@ -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