Reputation: 4587
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
?
Upvotes: 6
Views: 486