Permalink
Browse files

Document CNil.impossible

1 parent fcc15a6 commit 4fc3aeeb5e2c1bc760302adada36ae034a2080f5 @dwijnand dwijnand 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 4fc3aee

Please sign in to comment.