forked from kscience/kmath
inline class bug
This commit is contained in:
parent
68bd0ae0af
commit
dcf8f4c6fd
@ -38,9 +38,9 @@ object RealField : ExtendedField<Real>, Norm<Real, Real> {
|
||||
/**
|
||||
* 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<Real, RealField> {
|
||||
inline class Real(val value: Double) : FieldElement<Real, RealField> {
|
||||
|
||||
//values are dynamically calculated to save memory
|
||||
override val self
|
||||
|
@ -6,6 +6,8 @@ import kotlin.test.assertEquals
|
||||
class RealFieldTest {
|
||||
@Test
|
||||
fun testSqrt() {
|
||||
|
||||
//fails because KT-27586
|
||||
val sqrt = with(RealField) {
|
||||
sqrt( 25 * one)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user