Created
September 5, 2020 01:11
-
-
Save AhmedMourad0/4689ee454fcad15cc25f69a095b87ec0 to your computer and use it in GitHub Desktop.
Code snippets for the `value-based classes and error-handling` Medium article.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val password = Password.of("Some34Really434Hard21Password!").orThrow() //Throw on violation just for demonstration | |
val haha = password.copy(value = "gotcha") //Unresolved reference: copy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment