inline class bug

This commit is contained in:
Alexander Nozik 2018-11-15 11:07:51 +03:00
parent 68bd0ae0af
commit dcf8f4c6fd
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -6,6 +6,8 @@ import kotlin.test.assertEquals
class RealFieldTest {
@Test
fun testSqrt() {
//fails because KT-27586
val sqrt = with(RealField) {
sqrt( 25 * one)
}