title: Do scala constructor parameters default to private val?
body: <p>I have been trying:</p>
  
  <pre><code>class Foo(bar: Int)
  </code></pre>
  
  <p>vs:</p>
  
  <pre><code>class Foo(private val bar: Int)
  </code></pre>
  
  <p>and they seem to behave the same although I couldn't find anywhere saying that <code>(bar:
  Int)</code> expands to <code>(private val bar: Int)</code> so my question is, are these
  identical/similar?</p>
  
  <p>On a side note, I have been trying to use <code>-Xprint:typer</code> on these code pieces and they
  produce the same code except for an extra line in the second one. How do I
  read that extra line?</p>
  
  <pre><code>..
  class Foo extends scala.AnyRef {
    &lt;paramaccessor&gt; private[this] val bar: Int = _;
    def &lt;init&gt;(bar: Int): this.Foo = {
      Foo.super.&lt;init&gt;();
      ()
    }
  }
  ..
  
  
  ..
  class Foo extends scala.AnyRef {
    &lt;paramaccessor&gt; private[this] val bar: Int = _;
    &lt;stable&gt; &lt;accessor&gt; &lt;paramaccessor&gt; private def bar: Int = Foo.this.bar;
    def &lt;init&gt;(bar: Int): this.Foo = {
      Foo.super.&lt;init&gt;();
      ()
    }
  }
  ..
  </code></pre>