diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/Fields.kt b/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/Fields.kt index 5702803fc..3e4f47869 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/Fields.kt +++ b/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/Fields.kt @@ -38,9 +38,9 @@ object RealField : ExtendedField, Norm { /** * Real field element wrapping double. * - * TODO inline does not work due to compiler bug. Waiting for fix + * TODO inline does not work due to compiler bug. Waiting for fix for KT-27586 */ -class Real(val value: Double) : FieldElement { +inline class Real(val value: Double) : FieldElement { //values are dynamically calculated to save memory override val self diff --git a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/RealFieldTest.kt b/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/RealFieldTest.kt index 551bf0ee4..0d33204df 100644 --- a/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/RealFieldTest.kt +++ b/kmath-core/src/commonTest/kotlin/scientifik/kmath/operations/RealFieldTest.kt @@ -6,6 +6,8 @@ import kotlin.test.assertEquals class RealFieldTest { @Test fun testSqrt() { + + //fails because KT-27586 val sqrt = with(RealField) { sqrt( 25 * one) }