What is the structure delineated by curly brackets in a pattern match expression. It seems to be neither a Block nor a Template.
Asked
Active
Viewed 132 times
0
-
1It is a partial function. Consult http://stackoverflow.com/q/8650549/2684760 for further information. – ForNeVeR Jul 13 '14 at 15:00
-
2It's a bunch of cases in the grammar. http://www.scala-lang.org/files/archive/spec/2.11/08-pattern-matching.html#pattern-matching-expressions – som-snytt Jul 13 '14 at 16:06
1 Answers
2
Reflecting a bit on the question,
http://www.scala-lang.org/api/2.11.1/scala-reflect/#scala.reflect.api.Trees$MatchExtractor
the API also just calls them "cases".
The spec doesn't have a special name for it:
Maybe there is a more theoretical name for the patterns against which a match is performed.