Why this is not allowed? ```public value class Set...
# announcements
t
Why this is not allowed?
Copy code
public value class SetValue<Value>(public val value : Value)
"Inline class cannot have value parameter of type 'Value'"
y
The solution here is to use a concrete type of
Any?
and then make a factory function i.e. like this:
Copy code
@JvmInline public value class SetValue<Value> internal constructor(private val _value : Any?) {
    public val value: Value get() = _value as Value
}
public fun <Value> SetValue(value: Value) = SetValue<Value>(value)