From 189449f40e2d84c314225f92cec3cf04c4565aa8 Mon Sep 17 00:00:00 2001 From: Iaroslav Postovalov Date: Fri, 21 May 2021 20:08:17 +0700 Subject: [PATCH] Fix unresolved reference in generated type parameter --- .../space/kscience/kmath/asm/internal/AsmBuilder.kt | 4 ++-- .../kotlin/space/kscience/kmath/expressions/Symbol.kt | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/AsmBuilder.kt b/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/AsmBuilder.kt index 39ebf049d..a796ae2a5 100644 --- a/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/AsmBuilder.kt +++ b/kmath-ast/src/jvmMain/kotlin/space/kscience/kmath/asm/internal/AsmBuilder.kt @@ -342,8 +342,8 @@ internal class AsmBuilder( val MAP_INTRINSICS_TYPE: Type by lazy { getObjectType("space/kscience/kmath/asm/internal/MapIntrinsics") } /** - * ASM Type for [space.kscience.kmath.misc.Symbol]. + * ASM Type for [space.kscience.kmath.expressions.Symbol]. */ - val SYMBOL_TYPE: Type by lazy { getObjectType("space/kscience/kmath/misc/Symbol") } + val SYMBOL_TYPE: Type by lazy { getObjectType("space/kscience/kmath/expressions/Symbol") } } } diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/Symbol.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/Symbol.kt index 10a9ca5a1..74dc7aedc 100644 --- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/Symbol.kt +++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/Symbol.kt @@ -12,13 +12,13 @@ import kotlin.properties.ReadOnlyProperty * A marker interface for a symbol. A symbol must have an identity. * Ic */ -public interface Symbol: MST { +public interface Symbol : MST { /** * Identity object for the symbol. Two symbols with the same identity are considered to be the same symbol. */ public val identity: String - public companion object{ + public companion object { public val x: StringSymbol = StringSymbol("x") public val y: StringSymbol = StringSymbol("y") public val z: StringSymbol = StringSymbol("z") @@ -48,7 +48,7 @@ public operator fun Map.get(symbol: Symbol): T? = get(symbol.iden /** * Set a value of [String]-keyed map by a [Symbol] */ -public operator fun MutableMap.set(symbol: Symbol, value: T){ +public operator fun MutableMap.set(symbol: Symbol, value: T) { set(symbol.identity, value) } @@ -60,6 +60,6 @@ public operator fun Map.get(string: String): T? = get(StringSymbo /** * Set a value of [String]-keyed map by a [Symbol] */ -public operator fun MutableMap.set(string: String, value: T){ +public operator fun MutableMap.set(string: String, value: T) { set(StringSymbol(string), value) } \ No newline at end of file