Skip to content

Instantly share code, notes, and snippets.

@gigiigig
Created November 1, 2015 15:34
Show Gist options
  • Save gigiigig/dd2b261c189fb5c97a55 to your computer and use it in GitHub Desktop.
Save gigiigig/dd2b261c189fb5c97a55 to your computer and use it in GitHub Desktop.
Path dependent types
trait Foo {
trait Bar
}
object FooImpl extends Foo {
object ABar extends Bar
object BBar extends Bar
}
val foo = new Foo {}
val a: foo.Bar = new foo.Bar {}
val b: Foo#Bar = FooImpl.BBar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment