Matthias Berndt
Matthias Berndt

Reputation: 4587

Scala refined: concatenating NonEmptyStrings

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

Answers (0)

Related Questions