<p dir="auto">Babel transpiled subclasses of Promise had been working as intended for as recent as the last nodejs version (6.4.0), however with 6.5.0, I'm seeing errors like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    return _possibleConstructorReturn(this, (subPromise.__proto__ || Object.getPrototypeOf(subPromise)).call(this, executor));

        ^

TypeError: #&lt;subPromise&gt; is not a promise"><pre class="notranslate"><code class="notranslate">    return _possibleConstructorReturn(this, (subPromise.__proto__ || Object.getPrototypeOf(subPromise)).call(this, executor));

        ^

TypeError: #&lt;subPromise&gt; is not a promise
</code></pre></div>
<p dir="auto">Subclassing itself works fine if I run the code as is on nodejs. This issue happens regardless of whether I import polyfill or not.</p>
<h3 dir="auto">Input Code</h3>

<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;;

class subPromise extends Promise {
  constructor(executor) {
    super(executor);
  }
}

const testPromise = new subPromise((resolve, reject) =&gt; {
  resolve(42);
});

testPromise.then(console.log);"><pre class="notranslate"><span class="pl-s">"use strict"</span><span class="pl-kos">;</span>

<span class="pl-k">class</span> <span class="pl-s1">subPromise</span> <span class="pl-k">extends</span> <span class="pl-v">Promise</span> <span class="pl-kos">{</span>
  <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">executor</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-smi">super</span><span class="pl-kos">(</span><span class="pl-s1">executor</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span>

<span class="pl-k">const</span> <span class="pl-s1">testPromise</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-s1">subPromise</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">resolve</span><span class="pl-kos">,</span> <span class="pl-s1">reject</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
  <span class="pl-s1">resolve</span><span class="pl-kos">(</span><span class="pl-c1">42</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>

<span class="pl-s1">testPromise</span><span class="pl-kos">.</span><span class="pl-en">then</span><span class="pl-kos">(</span><span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-c1">log</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<h3 dir="auto">Babel Configuration (.bablerc, package.json, cli command)</h3>

<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;presets&quot;: [&quot;es2015&quot;]
}"><pre class="notranslate"><span class="pl-kos">{</span>
  <span class="pl-s">"presets"</span>: <span class="pl-kos">[</span><span class="pl-s">"es2015"</span><span class="pl-kos">]</span>
<span class="pl-kos">}</span></pre></div>
<h3 dir="auto">Expected Behavior</h3>


<p dir="auto">The test promise resolves into <code class="notranslate">42</code>.</p>
<h3 dir="auto">Current Behavior</h3>


<p dir="auto">Throws a type error.</p>
<h3 dir="auto">Possible Solution</h3>


<p dir="auto">Must be some sort of extra type checking introduced in 6.5.0? Bigger worry is how semantics of vanilla <code class="notranslate">class</code> keyword from nodejs and transpiled classes can diverge.</p>
<h3 dir="auto">Context</h3>


<p dir="auto">I'm working on a <a href="https://github.com/google/chained-promise">library</a> that extends Promise. Which I opened an issue (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="176143009" data-permission-text="Title is private" data-url="https://github.com/google/chained-promise/issues/6" data-hovercard-type="issue" data-hovercard-url="/google/chained-promise/issues/6/hovercard" href="https://github.com/google/chained-promise/issues/6">google/chained-promise#6</a>). I've also opened an issue with NodeJS, initially thinking this might to do with nodejs itself regressing in any way. (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="176142730" data-permission-text="Title is private" data-url="https://github.com/nodejs/node/issues/8474" data-hovercard-type="issue" data-hovercard-url="/nodejs/node/issues/8474/hovercard" href="https://github.com/nodejs/node/issues/8474">nodejs/node#8474</a>)</p>
<h3 dir="auto">Your Environment</h3>

<table role="table">
<thead>
<tr>
<th>software</th>
<th>version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Babel</td>
<td>tested on 6.4.0 and 6.14.0</td>
</tr>
<tr>
<td>node</td>
<td>6.5.0</td>
</tr>
<tr>
<td>npm</td>
<td>3.5.2</td>
</tr>
<tr>
<td>Operating System</td>
<td>Tested on Windows and Linux</td>
</tr>
</tbody>
</table>
<h3 dir="auto">Input Code</h3>

<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class ReadError extends Error {}

new ReadError('Boom') instanceof ReadError // =&gt; false"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">ReadError</span> <span class="pl-k">extends</span> <span class="pl-v">Error</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>

<span class="pl-k">new</span> <span class="pl-v">ReadError</span><span class="pl-kos">(</span><span class="pl-s">'Boom'</span><span class="pl-kos">)</span> <span class="pl-k">instanceof</span> <span class="pl-v">ReadError</span> <span class="pl-c">// =&gt; false</span></pre></div>
<h3 dir="auto">Babel Configuration (.bablerc, package.json, cli command)</h3>

<p dir="auto"><a href="https://babeljs.io/repl/#?babili=false&amp;evaluate=true&amp;lineWrap=false&amp;presets=es2015&amp;experimental=true&amp;loose=false&amp;spec=false&amp;playground=false&amp;code=class%20ReadError%20extends%20Error%20%7B%7D%0A%0Aalert(new%20ReadError('Boom')%20instanceof%20ReadError)%20%2F%2F%20%3D%3E%20false" rel="nofollow">https://babeljs.io/repl/#?babili=false&amp;evaluate=true&amp;lineWrap=false&amp;presets=es2015&amp;experimental=true&amp;loose=false&amp;spec=false&amp;playground=false&amp;code=class%20ReadError%20extends%20Error%20%7B%7D%0A%0Aalert(new%20ReadError('Boom')%20instanceof%20ReadError)%20%2F%2F%20%3D%3E%20false</a></p>
<h3 dir="auto">Expected Behavior</h3>


<p dir="auto">should alert <code class="notranslate">true</code></p>
<h3 dir="auto">Current Behavior</h3>


<p dir="auto">alerts <code class="notranslate">false</code></p>