Created
October 18, 2018 08:18
-
-
Save dragos/1fd05b3043b0e698ff054b419c9b11e2 to your computer and use it in GitHub Desktop.
Match exhaustiveness
This file contains 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 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