<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" % babel --optional es7.asyncFunctions example.js                                                                                                                               !10039

/usr/local/lib/node_modules/babel/node_modules/babel-core/lib/babel/helpers/parse.js:70
    throw err;
          ^
AssertionError: foo.js: undefined does not match type Pattern
    at Type.Tp.assert (/usr/local/lib/node_modules/babel/node_modules/babel-core/node_modules/ast-types/lib/types.js:53:16)
    at addPattern (/usr/local/lib/node_modules/babel/node_modules/babel-core/node_modules/ast-types/lib/scope.js:220:24)
    at recursiveScanScope (/usr/local/lib/node_modules/babel/node_modules/babel-core/node_modules/ast-types/lib/scope.js:167:9)
    at recursiveScanChild (/usr/local/lib/node_modules/babel/node_modules/babel-core/node_modules/ast-types/lib/scope.js:214:9)
    at NodePath.&lt;anonymous&gt; (/usr/local/lib/node_modules/babel/node_modules/babel-core/node_modules/ast-types/lib/scope.js:150:13)
    at NodePath.each (/usr/local/lib/node_modules/babel/node_modules/babel-core/node_modules/ast-types/lib/path.js:96:22)
    at recursiveScanScope (/usr/local/lib/node_modules/babel/node_modules/babel-core/node_modules/ast-types/lib/scope.js:149:14)
    at recursiveScanChild (/usr/local/lib/node_modules/babel/node_modules/babel-core/node_modules/ast-types/lib/scope.js:214:9)
    at /usr/local/lib/node_modules/babel/node_modules/babel-core/node_modules/ast-types/lib/scope.js:176:13
    at /usr/local/lib/node_modules/babel/node_modules/babel-core/node_modules/ast-types/lib/types.js:627:18
"><pre class="notranslate"> <span class="pl-c1">%</span> <span class="pl-s1">babel</span> <span class="pl-c1">--</span><span class="pl-s1">optional</span> <span class="pl-s1">es7</span><span class="pl-kos">.</span><span class="pl-c1">asyncFunctions</span> <span class="pl-s1">example</span><span class="pl-kos">.</span><span class="pl-c1">js</span>                                                                                                                               <span class="pl-c1">!</span><span class="pl-c1">10039</span>

<span class="pl-c1">/</span><span class="pl-s1">usr</span><span class="pl-c1">/</span><span class="pl-s1">local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">-</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">/</span><span class="pl-s1">helpers</span><span class="pl-c1">/</span><span class="pl-s1">parse</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">70</span>
    <span class="pl-k">throw</span> <span class="pl-s1">err</span><span class="pl-kos">;</span>
          <span class="pl-c1">^</span>
AssertionError: <span class="pl-s1">foo</span><span class="pl-kos">.</span><span class="pl-c1">js</span>: <span class="pl-c1">undefined</span> <span class="pl-s1">does</span> <span class="pl-s1">not</span> <span class="pl-s1">match</span> <span class="pl-s1">type</span> <span class="pl-v">Pattern</span>
    <span class="pl-s1">at</span> <span class="pl-v">Type</span><span class="pl-kos">.</span><span class="pl-c1">Tp</span><span class="pl-kos">.</span><span class="pl-en">assert</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>usr<span class="pl-c1">/</span>local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">-</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">ast</span><span class="pl-c1">-</span><span class="pl-s1">types</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">types</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">53</span>:<span class="pl-c1">16</span><span class="pl-kos">)</span>
    <span class="pl-en">at</span> <span class="pl-s1">addPattern</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>usr<span class="pl-c1">/</span>local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">-</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">ast</span><span class="pl-c1">-</span><span class="pl-s1">types</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">scope</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">220</span>:<span class="pl-c1">24</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span><span class="pl-kos"></span> <span class="pl-en">recursiveScanScope</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>usr<span class="pl-c1">/</span>local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">-</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">ast</span><span class="pl-c1">-</span><span class="pl-s1">types</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">scope</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">167</span>:<span class="pl-c1">9</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span><span class="pl-kos"></span> <span class="pl-en">recursiveScanChild</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>usr<span class="pl-c1">/</span>local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">-</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">ast</span><span class="pl-c1">-</span><span class="pl-s1">types</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">scope</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">214</span>:<span class="pl-c1">9</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span> <span class="pl-v">NodePath</span><span class="pl-kos">.</span><span class="pl-c1">&lt;</span><span class="pl-s1">anonymous</span><span class="pl-c1">&gt;</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>usr<span class="pl-c1">/</span>local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">-</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">ast</span><span class="pl-c1">-</span><span class="pl-s1">types</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">scope</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">150</span>:<span class="pl-c1">13</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span> <span class="pl-v">NodePath</span><span class="pl-kos">.</span><span class="pl-en">each</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>usr<span class="pl-c1">/</span>local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">-</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">ast</span><span class="pl-c1">-</span><span class="pl-s1">types</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">96</span>:<span class="pl-c1">22</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span><span class="pl-kos"></span> <span class="pl-en">recursiveScanScope</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>usr<span class="pl-c1">/</span>local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">-</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">ast</span><span class="pl-c1">-</span><span class="pl-s1">types</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">scope</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">149</span>:<span class="pl-c1">14</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span><span class="pl-kos"></span> <span class="pl-en">recursiveScanChild</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>usr<span class="pl-c1">/</span>local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">-</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">ast</span><span class="pl-c1">-</span><span class="pl-s1">types</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">scope</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">214</span>:<span class="pl-c1">9</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span> <span class="pl-c1">/</span><span class="pl-s1">usr</span><span class="pl-c1">/</span><span class="pl-s1">local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">-</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">ast</span><span class="pl-c1">-</span><span class="pl-s1">types</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">scope</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">176</span>:<span class="pl-c1">13</span>
    <span class="pl-s1">at</span> <span class="pl-c1">/</span><span class="pl-s1">usr</span><span class="pl-c1">/</span><span class="pl-s1">local</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">babel</span><span class="pl-c1">-</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">node_modules</span><span class="pl-c1">/</span><span class="pl-s1">ast</span><span class="pl-c1">-</span><span class="pl-s1">types</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">types</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">627</span>:<span class="pl-c1">18</span></pre></div>
<p dir="auto">where:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// example.js
import f from 'f';

    f(async function(assert) { });
//  ^ this function is imported"><pre class="notranslate"><span class="pl-c">// example.js</span>
<span class="pl-k">import</span> <span class="pl-s1">f</span> <span class="pl-k">from</span> <span class="pl-s">'f'</span><span class="pl-kos">;</span>

    <span class="pl-en">f</span><span class="pl-kos">(</span><span class="pl-k">async</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">assert</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-c">//  ^ this function is imported</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="± % babel --v
5.0.9

± % npm version
{ 'ember-jobs': '0.0.0',
  npm: '2.7.4',
  http_parser: '2.3',
  modules: '14',
  node: '0.12.2',
  openssl: '1.0.1m',
  uv: '1.4.2-node1',
  v8: '3.28.73',
  zlib: '1.2.8' }"><pre class="notranslate"><code class="notranslate">± % babel --v
5.0.9

± % npm version
{ 'ember-jobs': '0.0.0',
  npm: '2.7.4',
  http_parser: '2.3',
  modules: '14',
  node: '0.12.2',
  openssl: '1.0.1m',
  uv: '1.4.2-node1',
  v8: '3.28.73',
  zlib: '1.2.8' }
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import foo from 'bar';
(function* () {});"><pre class="notranslate"><code class="notranslate">import foo from 'bar';
(function* () {});
</code></pre></div>
<p dir="auto">Compiling this raises <code class="notranslate">AssertionError: test.js: undefined does not match type Pattern</code></p>