title: Is it a bug in firefox developer edition?
body: <p>Take a look at the below code:</p>
  
  <pre><code>var c = 50;
  
  {
      console.log(y);
      let y = 50;
  }
  </code></pre>
  
  <p>This code is expected to throw a ReferenceError and it does. But in the console, the message attached with the exception just blown my mind. It says:</p>
  
  <blockquote>
    <p>ReferenceError: can't access lexical declaration 'c' before initialization</p>
  </blockquote>
  
  <p>In the code <code>c</code> is the first variable declared. The error message indicates that something is wrong with the declaration of <code>c</code>. It's clearly the <code>y</code> variable inside the block, causing the exception. We can't use variables declared using <code>let</code> before its declaration. When I declare another variable in the first line, say <code>test</code>, the error message changes to:</p>
  
  <blockquote>
    <p>ReferenceError: can't access lexical declaration 'test' before initialization</p>
  </blockquote>
  
  <p>Am I missing something or am I right about the bug? I have the latest Firefox Developer Edition (version 49.0a2).</p>
  
  <p>Another thing worth noticing is that the block is simply an enclosing block, it is not the body of a function. </p>