From d521fa0d8d7e0be670d019431209fad8ca8ab4f5 Mon Sep 17 00:00:00 2001 From: Iaroslav Postovalov Date: Tue, 22 Dec 2020 13:15:01 +0700 Subject: [PATCH] Fix wrong function name --- .../kotlin/kscience/kmath/estree/internal/ESTreeBuilder.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/internal/ESTreeBuilder.kt b/kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/internal/ESTreeBuilder.kt index e03a71123..e1823813a 100644 --- a/kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/internal/ESTreeBuilder.kt +++ b/kmath-ast/src/jsMain/kotlin/kscience/kmath/estree/internal/ESTreeBuilder.kt @@ -42,7 +42,7 @@ internal class ESTreeBuilder(val bodyCallback: ESTreeBuilder.() -> BaseExp value == null || jsTypeOf(value) == "number" || jsTypeOf(value) == "string" || jsTypeOf(value) == "boolean" -> SimpleLiteral(value) - jsType(value) == "undefined" -> Identifier("undefined") + jsTypeOf(value) == "undefined" -> Identifier("undefined") else -> { val idx = if (value in constants) constants.indexOf(value) else constants.also { it += value }.lastIndex