// compilation succeeds
val p1: LowerCased = LowerCased("Abc")
// compilation succeeds
LowerCased.from("abc")
// compilation fails:
// got a string which is not all lower case: Abc
LowerCased.from("Abc")
// compilation fails:
// got a value which is not a constant string: Usage.z
val z = "x" * 10
LowerCased.from(z)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter