Hello,
I’m trying to create an inline given instance of a Constraint
:
trait Constraint[A, B] {
inline def assert(value: A): Boolean
}
My given instance:
transparent inline given [V <: Double]: Constraint[Double, Lesser[V]] with {
override inline def assert(value: Double): Boolean = value < constValue[V]
}
But I receive this error:
Implementation restriction: nested inline methods are not supported
Because I’m overriding an inline method inside another inline given instance (or inline method).
Is there a way to achieve the same behavior without this error ?