Skip to content

Instantly share code, notes, and snippets.

@dragos
Created October 18, 2018 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dragos/1fd05b3043b0e698ff054b419c9b11e2 to your computer and use it in GitHub Desktop.
Save dragos/1fd05b3043b0e698ff054b419c9b11e2 to your computer and use it in GitHub Desktop.
Match exhaustiveness
sealed abstract class Tree
abstract class Expression extends Tree
case class Apply() extends Expression
class Foo(t: Tree) {
// is this match exhaustive?
t match {
case Apply() => ???
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment