Created
November 19, 2011 06:07
-
-
Save missingfaktor/1378512 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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