Use Namer.CALLEE_NAME in ClassInitializerTranslator.
Adapted from https://github.com/develar/kotlin/commit/a9e0a42fb1347fa8e21c86b5a073ef8a7c873da0.
This commit is contained in:
+1
-1
@@ -81,7 +81,7 @@ public final class ClassInitializerTranslator extends AbstractTranslator {
|
|||||||
|
|
||||||
//TODO: can be problematic to maintain
|
//TODO: can be problematic to maintain
|
||||||
if (context().isEcma5()) {
|
if (context().isEcma5()) {
|
||||||
JsName ref = context().scope().declareName("$initializer");
|
JsName ref = context().scope().declareName(Namer.CALLEE_NAME);
|
||||||
initializer.setName(ref);
|
initializer.setName(ref);
|
||||||
JsInvocation call = new JsInvocation(new JsNameRef("call", new JsNameRef("baseInitializer", ref.makeRef())));
|
JsInvocation call = new JsInvocation(new JsNameRef("call", new JsNameRef("baseInitializer", ref.makeRef())));
|
||||||
call.getArguments().add(JsLiteral.THIS);
|
call.getArguments().add(JsLiteral.THIS);
|
||||||
|
|||||||
Reference in New Issue
Block a user