Skip to content

Instantly share code, notes, and snippets.

@channingwalton
Created January 22, 2013 20:57
Show Gist options
  • Save channingwalton/4598348 to your computer and use it in GitHub Desktop.
Save channingwalton/4598348 to your computer and use it in GitHub Desktop.
Not cake
trait FooComponent {
def bar: BarComponent#Bar
case class Foo(foofy: String)
}
trait BarComponent {
def foo: FooComponent#Foo
case class Bar(bah: String)
}
object System extends App with FooComponent with BarComponent {
val foo = Foo("foo")
val bar = Bar("bar")
println(s"${foo.foofy} and ${bar.bah}")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment