Skip to content

Instantly share code, notes, and snippets.

@missingfaktor
Created November 19, 2011 06:07
Show Gist options
  • Select an option

  • Save missingfaktor/1378512 to your computer and use it in GitHub Desktop.

Select an option

Save missingfaktor/1378512 to your computer and use it in GitHub Desktop.
scala> trait Lol
defined trait Lol
scala> case class Wut(x: Int)
defined class Wut
scala> val y = Wut(13)
y: Wut = Wut(13)
scala> val z = y match {
| case Wut(n) => new Wut(n) with Lol
| }
z: Wut with Lol = Wut(13)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment