Fix inlining of default arguments in JS BE

This commit is contained in:
Alexey Andreev
2017-07-12 11:56:57 +03:00
parent 834cd1d93d
commit 6bb5d00700
@@ -434,6 +434,13 @@ public class JsInliner extends JsVisitorWithContextImpl {
}
RewriteUtilsKt.replaceNames(function, replacements);
copiedStatements.add(new JsExpressionStatement(function));
for (Map.Entry<JsName, JsFunction> entry : CollectUtilsKt.collectNamedFunctions(new JsBlock(copiedStatements)).entrySet()) {
if (MetadataProperties.getStaticRef(entry.getKey()) instanceof JsFunction) {
MetadataProperties.setStaticRef(entry.getKey(), entry.getValue());
}
}
}
private static boolean isSuspendWithCurrentContinuation(@Nullable DeclarationDescriptor descriptor) {