Created
June 21, 2016 21:54
-
-
Save missingfaktor/3e70ae44f6714e7eeef29ecb90d88f64 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
sealed trait JobDescription | |
sealed trait HasN { | |
def n: Int | |
} | |
case class JobOne(n: Int) extends JobDescription with HasN | |
case object JobTwo extends JobDescription | |
case class JobThree(n: Int) extends JobDescription with HasN | |
def taskOneWorker(job: JobOne): Unit = { | |
println(job.n) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment