Skip to content

Instantly share code, notes, and snippets.

@Krasnyanskiy
Last active April 3, 2016 20:55
Show Gist options
  • Save Krasnyanskiy/09d6ae0f4b6630ce3a92237c67bd7715 to your computer and use it in GitHub Desktop.
Save Krasnyanskiy/09d6ae0f4b6630ce3a92237c67bd7715 to your computer and use it in GitHub Desktop.
-scala: type classes?
trait A {
def foo()
}
trait B {
def bar()
}
trait C {
self: A with B =>
}
new C with B with A {
def bar(): Unit = ()
def foo(): Unit = ()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment