Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
fun Task.printAssignment() {
when (assignedTo) {
is AssignedToNoOne -> println("\"$name\" is assigned to no one")
is AssignedToGroup -> println("\"$name\" is assigned to ${assignedTo.group.name}")
is AssignedToUser -> println("\"$name\" is assigned to ${assignedTo.user.name}")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment