<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var z = () =&gt; {};
new z;"><pre class="notranslate"><code class="notranslate">var z = () =&gt; {};
new z;
</code></pre></div>
<p dir="auto">This code should throw per spec, but results in creating instance of z.function.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let hello = () =&gt; &quot;Yo!&quot;;
let greet = new hello();"><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-en">hello</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s">"Yo!"</span><span class="pl-kos">;</span>
<span class="pl-k">let</span> <span class="pl-s1">greet</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-en">hello</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">^ must throw <code class="notranslate">TypeError: hello is not a constructor</code> but it does not. <a href="http://6to5.org/repl/#?experimental=true&amp;playground=true&amp;evaluate=true&amp;loose=false&amp;code=let%20hello%20%3D%20%28%29%20%3D%3E%20%22Yo!%22%3B%0A%0Alet%20greet%20%3D%20new%20hello%28%29%3B%0A" rel="nofollow">Same code</a></p>