Skip to content

Commit 50f7fa5

Browse files
authored
Fix false naming escaping in JavaScript (#1952)
1 parent b071cf5 commit 50f7fa5

File tree

1 file changed

+1
-3
lines changed
  • utbot-js/src/main/kotlin/framework/codegen/model/constructor/visitor

1 file changed

+1
-3
lines changed

utbot-js/src/main/kotlin/framework/codegen/model/constructor/visitor/CgJsRenderer.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ import org.utbot.framework.codegen.renderer.CgAbstractRenderer
5050
import org.utbot.framework.codegen.renderer.CgPrinter
5151
import org.utbot.framework.codegen.renderer.CgPrinterImpl
5252
import org.utbot.framework.codegen.renderer.CgRendererContext
53-
import org.utbot.framework.codegen.services.language.isLanguageKeyword
5453
import org.utbot.framework.plugin.api.BuiltinMethodId
5554
import org.utbot.framework.plugin.api.ClassId
5655
import org.utbot.framework.plugin.api.TypeParameters
@@ -409,8 +408,7 @@ internal class CgJsRenderer(context: CgRendererContext, printer: CgPrinter = CgP
409408
print("${exception.name.escapeNamePossibleKeyword()}: ${exception.type}")
410409
}
411410

412-
override fun escapeNamePossibleKeywordImpl(s: String): String =
413-
if (isLanguageKeyword(s, context.cgLanguageAssistant)) "`$s`" else s
411+
override fun escapeNamePossibleKeywordImpl(s: String): String = s
414412

415413
override fun renderClassVisibility(classId: ClassId) {
416414
TODO("Not yet implemented")

0 commit comments

Comments
 (0)