Skip to content

Instantly share code, notes, and snippets.

@Shinpeim
Created December 6, 2016 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shinpeim/1ad85b03c482cb84e2eb603809846256 to your computer and use it in GitHub Desktop.
Save Shinpeim/1ad85b03c482cb84e2eb603809846256 to your computer and use it in GitHub Desktop.
class ComponentBuilder[X](a: X, b:X) {
class ClassA[X](val v: X)
class ClassB[X](val v: X)
def buildA = new ClassA(x)
def buildB = new ClassB(y)
}
val b = new ComponentBuilder[Int](1, 2)
println(b.buildA.x)
println(b.buildB.y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment