Hi, I'm trying to replace refined types with arrow...
# arrow
t
Hi, I'm trying to replace refined types with arrow analysis. Everything goes reasonably well (some NotImplementedErrors here and there). But I encountered:
Copy code
@JvmInline
@Serializable
value class Email(val value: String) {
    init {
        pre(value.matches(emailRegex)){ "Must be a valid email" }
    }

    override fun toString(): String = value
}
which of course won't work since
Copy code
You can only create Boolean expressions using basic arithmetic operations (addition, subtraction, …), comparisons, and simple Boolean operations (and, or, not). In particular, you cannot define a Boolean function and use it in a condition;
Will there be possibility of regex matching in the future or should we use a runtime solution?
r
t
thanks for clarification Raul
👍 1