<p dir="auto">In ES6 spec in section in <a href="https://people.mozilla.org/~jorendorff/es6-draft.html#sec-let-and-const-declarations" rel="nofollow">Let and Const Declaration</a></p>
<blockquote>
<p dir="auto">LexicalDeclaration : LetOrConst BindingList ;</p>
<ul dir="auto">
<li>It is a Syntax Error if the BoundNames of BindingList contains "let".</li>
<li>It is a Syntax Error if the BoundNames of BindingList contains any duplicate entries.</li>
</ul>
</blockquote>
<p dir="auto">currently we allow</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let let = 10;
const let = 30;"><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-s1">let</span> <span class="pl-c1">=</span> <span class="pl-c1">10</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">let</span> <span class="pl-c1">=</span> <span class="pl-c1">30</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">which should be syntax error regardless of strict-mode.<br>
Note: below shouldn't be a syntax error unless it is in strict-mode</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let = 10
var let = 20;"><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-c1">=</span> <span class="pl-c1">10</span>
<span class="pl-k">var</span> <span class="pl-s1">let</span> <span class="pl-c1">=</span> <span class="pl-c1">20</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">The following examples should trigger an early error in JS:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let let = 10;"><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-s1">let</span> <span class="pl-c1">=</span> <span class="pl-c1">10</span><span class="pl-kos">;</span></pre></div>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const let = 10;"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">let</span> <span class="pl-c1">=</span> <span class="pl-c1">10</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><sub>Note: a similar test exists in <code class="notranslate">tests/cases/conformance/es6/for-ofStatements/for-of56.ts</code>) for the following 3 examples</sub></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="for (var let of [1,2,3]) {
}"><pre class="notranslate"><span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">let</span> <span class="pl-k">of</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span><span class="pl-c1">2</span><span class="pl-kos">,</span><span class="pl-c1">3</span><span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span></pre></div>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="for (let let of [1,2,3]) {
}"><pre class="notranslate"><span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">let</span> <span class="pl-s1">let</span> <span class="pl-k">of</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span><span class="pl-c1">2</span><span class="pl-kos">,</span><span class="pl-c1">3</span><span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span></pre></div>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="for (const let of [1,2,3]) {
}"><pre class="notranslate"><span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">const</span> <span class="pl-s1">let</span> <span class="pl-k">of</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span><span class="pl-c1">2</span><span class="pl-kos">,</span><span class="pl-c1">3</span><span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">I'm not sure if the following should trigger an error:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var let = 10;
for (let of [1,2,3]) {
}"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">let</span> <span class="pl-c1">=</span> <span class="pl-c1">10</span><span class="pl-kos">;</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">let</span> <span class="pl-s1">of</span><span class="pl-kos"></span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span><span class="pl-c1">2</span><span class="pl-kos">,</span><span class="pl-c1">3</span><span class="pl-kos">]</span><span class="pl-kos"></span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-kos">}</span></pre></div>
<hr>
<hr>
<blockquote>
<h3 dir="auto"><span id="user-content-sec-13.2.1.1"><a href="https://people.mozilla.org/~jorendorff/es6-draft.html#sec-let-and-const-declarations-static-semantics-early-errors" rel="nofollow">13.2.1.1</a></span> Static Semantics: Early Errors</h3>
<p dir="auto"><em>LexicalDeclaration</em> <span>:</span> <em>LetOrConst</em> <em>BindingList</em> <code class="notranslate">;</code></p>
<ul dir="auto">
<li>It is a Syntax Error if the BoundNames of <em>BindingList</em> contains <code class="notranslate">"let"</code>.</li>
</ul>
</blockquote>
<hr>
<blockquote>
<h3 dir="auto"><span id="user-content-sec-13.6.4.1"><a href="https://people.mozilla.org/~jorendorff/es6-draft.html#sec-for-in-and-for-of-statements-static-semantics-early-errors" rel="nofollow">13.6.4.1</a></span> Static Semantics: Early Errors</h3>
<p dir="auto"><em>IterationStatement</em> <span>:</span></p>
<p dir="auto"><code class="notranslate">for</code> <code class="notranslate">(</code> <em>ForDeclaration</em> <code class="notranslate">in</code> <em>Expression</em> <code class="notranslate">)</code> <em>Statement</em></p>
<p dir="auto"><code class="notranslate">for</code> <code class="notranslate">(</code> <em>ForDeclaration</em> <code class="notranslate">of</code> <em>AssignmentExpression</em> <code class="notranslate">)</code> <em>Statement</em></p>
<ul dir="auto">
<li>It is a Syntax Error if the BoundNames of <em>ForDeclaration</em> contains <code class="notranslate">"let"</code>.</li>
</ul>
</blockquote>