Inherit properties in function from method in loose mode (#9135)

This commit is contained in:
Rubén Norte 2018-12-07 14:57:48 +00:00 committed by Nicolò Ribaudo
parent f611bb016b
commit 4fdb71151f

View File

@ -494,7 +494,8 @@ export default function transformClass(
node.generator, node.generator,
node.async, node.async,
); );
func.returnType = node.returnType; t.inherits(func, node);
const key = t.toComputedKey(node, node.key); const key = t.toComputedKey(node, node.key);
if (t.isStringLiteral(key)) { if (t.isStringLiteral(key)) {
func = nameFunction({ func = nameFunction({