title: Why is it possible to declare variable with same name in the REPL?
body: <pre><code>scala&gt; val hi = "Hello \"e"
  hi: String = Hello "e
  
  
  scala&gt; val hi = "go"
  hi: String = go
  </code></pre>
  
  <p>Within same REPL session why its allowing me to declare variable hi with same name ?</p>
  
  <pre><code>scala&gt; hi
  res1: String = go
  
  scala&gt; hi="new"
  &lt;console&gt;:8: error: reassignment to val
     hi="new"
       ^
  </code></pre>
  
  <p>This error i understood we cannot reassign val</p>