Scala refined: concatenating NonEmptyStrings

333 Views Asked by At

I'm using the NonEmptyString type from the refined library. When concatenating two strings, at least one of which is non-empty, the result is obviously another non-empty string. But is there a way to convince the Scala compiler of this fact without using unsafe methods such as NonEmptyString.unsafeFrom?

0

There are 0 best solutions below