title: Scala: Can you use "foo match { bar }" in an expression without parentheses?
body: <p>Why are the parentheses needed here? Are there some precedence rules I should know?</p>
  
  <pre><code>scala&gt; 'x' match { case _ =&gt; 1 } + 1
  &lt;console&gt;:1: error: ';' expected but identifier found.
         'x' match { case _ =&gt; 1 } + 1
                                   ^
  
  scala&gt; ('x' match { case _ =&gt; 1 }) + 1
  res2: Int = 2
  </code></pre>
  
  <p>Thanks!</p>