Skip to content

Instantly share code, notes, and snippets.

@sliskiCode
Last active October 28, 2016 14:04
Show Gist options
  • Save sliskiCode/014722d1afb11f93cb79fd05003efba0 to your computer and use it in GitHub Desktop.
Save sliskiCode/014722d1afb11f93cb79fd05003efba0 to your computer and use it in GitHub Desktop.
Zero boilerplate delegation in Kotlin 2
class CopyPrinter(copier: Copy, printer: Print) : Copy by copier, Print by printer
interface Copy {
fun copy(page: Page): Page
}
interface Print {
fun print(page: Page)
}
class Page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment