Skip to content

Instantly share code, notes, and snippets.

@le0nidas
Created October 28, 2018 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save le0nidas/f407a2ea2b3534a98cefc8448d63b971 to your computer and use it in GitHub Desktop.
Save le0nidas/f407a2ea2b3534a98cefc8448d63b971 to your computer and use it in GitHub Desktop.
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