Last active
October 25, 2016 09:16
-
-
Save sliskiCode/4192ce938bc616739df0e86f833f864b to your computer and use it in GitHub Desktop.
Builders in Kotlin. Gist 6
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
class Person(val name: String, val surname: String, val age: Int = 0) | |
Person(name = "Peter", surname = "Slesarew") // <- name, surname are mandatory | |
Person(name = "Peter") // <- it does not compile | |
Person(surname = "Slesarew") // <- it does not compile | |
Person(age = 28) // <- it does not compile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment