Skip to content

Instantly share code, notes, and snippets.

@maxhodak
Last active December 14, 2015 04:08
Show Gist options
  • Save maxhodak/5025643 to your computer and use it in GitHub Desktop.
Save maxhodak/5025643 to your computer and use it in GitHub Desktop.
nested class creation
class A(q: mutable.Set[B])
class B(a: String)(implicit a: A)
val a = A(mutable.Set(
B("a"),
B("b"),
B("c")))
// access the outer A object:
// a.q.head.a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment