Fix translation of labels with non-identifier names in JS BE
See KT-18027
This commit is contained in:
@@ -665,7 +665,7 @@ public class JsAstMapper {
|
||||
private JsLabel mapLabel(Node labelNode) throws JsParserException {
|
||||
String fromName = labelNode.getFirstChild().getString();
|
||||
|
||||
JsName toName = scopeContext.enterLabel(fromName);
|
||||
JsName toName = scopeContext.enterLabel(fromName, fromName);
|
||||
|
||||
Node fromStmt = labelNode.getFirstChild().getNext();
|
||||
JsLabel toLabel = new JsLabel(toName);
|
||||
|
||||
@@ -49,8 +49,8 @@ class ScopeContext(scope: JsScope) {
|
||||
exitScope()
|
||||
}
|
||||
|
||||
fun enterLabel(ident: String): JsName =
|
||||
(currentScope as JsDeclarationScope).enterLabel(ident)
|
||||
fun enterLabel(ident: String, outputName: String): JsName =
|
||||
(currentScope as JsDeclarationScope).enterLabel(ident, outputName)
|
||||
|
||||
fun exitLabel() =
|
||||
(currentScope as JsDeclarationScope).exitLabel()
|
||||
|
||||
Reference in New Issue
Block a user