Groups
Groups
Sign in
Groups
Groups
scala-language
Conversations
About
Send feedback
Help
match-expression in infix position
29 views
Skip to first unread message
Simon Schäfer
unread,
May 4, 2013, 5:25:53 PM
5/4/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scala-l...@googlegroups.com
Is there a special reason why it is not possible to use a
match-expression in infix position (without surrounding it with
parentheses)?
scala> 1 match {case x => x} + 1
<console>:1: error: ';' expected but identifier found.
1 match {case x => x} + 1
^
scala> (1 match {case x => x}) + 1
res23: Int = 2
Reply all
Reply to author
Forward
0 new messages