Permalink
Browse files

Merge pull request #677 from milessabin/doc-cnil-impossible

Document CNil.impossible
  • Loading branch information...
2 parents fcc15a6 + 4fc3aee commit 0c01f218a76c20cce706a031aba46eadaaf65988 @milessabin committed on GitHub Jan 11, 2017
Showing with 1 addition and 0 deletions.
  1. +1 −0 core/src/main/scala/shapeless/coproduct.scala
@@ -115,6 +115,7 @@ final case class Inr[+H, +T <: Coproduct](tail : T) extends :+:[H, T] {
* of `:+:` can not be constructed properly.
*/
sealed trait CNil extends Coproduct {
+ /** Call this when you hit the CNil case in pattern matching to make the match exhaustive and safe. */
def impossible: Nothing
}

0 comments on commit 0c01f21

Please sign in to comment.