From 6686144538268343e47856d39b26fc8a42d17e01 Mon Sep 17 00:00:00 2001 From: Iaroslav Date: Sat, 6 Jun 2020 22:09:18 +0700 Subject: [PATCH] Add type casts for constants --- .../kotlin/scientifik/kmath/expressions/AsmExpressions.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kmath-asm/src/main/kotlin/scientifik/kmath/expressions/AsmExpressions.kt b/kmath-asm/src/main/kotlin/scientifik/kmath/expressions/AsmExpressions.kt index 1b44903cd..8060674e5 100644 --- a/kmath-asm/src/main/kotlin/scientifik/kmath/expressions/AsmExpressions.kt +++ b/kmath-asm/src/main/kotlin/scientifik/kmath/expressions/AsmExpressions.kt @@ -178,9 +178,9 @@ class AsmGenerationContext(classOfT: Class<*>, private val algebra: Algebra } - fun visitLoadFromConstants(value: T) = visitLoadAnyFromConstants(value as Any) + fun visitLoadFromConstants(value: T) = visitLoadAnyFromConstants(value as Any, T_CLASS) - fun visitLoadAnyFromConstants(value: Any) { + fun visitLoadAnyFromConstants(value: Any, type: String) { val idx = if (value in constants) constants.indexOf(value) else constants.apply { add(value) }.lastIndex maxStack++ @@ -189,7 +189,7 @@ class AsmGenerationContext(classOfT: Class<*>, private val algebra: Algebra(classOfT: Class<*>, private val algebra: Algebra