Skip to content

Instantly share code, notes, and snippets.

@nuclearace
Last active August 29, 2015 14:27
Show Gist options
  • Select an option

  • Save nuclearace/e1c749729998e3b80093 to your computer and use it in GitHub Desktop.

Select an option

Save nuclearace/e1c749729998e3b80093 to your computer and use it in GitHub Desktop.
abstract class Cloneable[T <: Cloneable[T]] {
def clone(original: T): T
}
class TestChild(name: String) extends Cloneable[TestChild] {
def clone(original: TestChild) = {
new TestChild(original.name)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment