<blockquote>
<p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jonathanong/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jonathanong">@jonathanong</a></p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.2.0</li>
<li><strong>Node version:</strong> 5.1.0</li>
<li><strong>npm version:</strong> 3.3.12</li>
</ul>
<h3 dir="auto">Options</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
  &quot;presets&quot;: [
    &quot;es2015&quot;,
    &quot;stage-0&quot;,
    &quot;react&quot;
  ],
  &quot;plugins&quot;: [
    &quot;lodash&quot;,
    &quot;transform-runtime&quot;
  ]
}"><pre class="notranslate"><code class="notranslate">{
  "presets": [
    "es2015",
    "stage-0",
    "react"
  ],
  "plugins": [
    "lodash",
    "transform-runtime"
  ]
}
</code></pre></div>
<h3 dir="auto">Input code</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="'use strict'

export default async function a(x) {
  return 2 * b(x)
}

async function b(x) {
  return x + 1
}"><pre class="notranslate"><code class="notranslate">'use strict'

export default async function a(x) {
  return 2 * b(x)
}

async function b(x) {
  return x + 1
}
</code></pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">The output is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="'use strict';

var b = (function () {
  var ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(x) {
    return _regenerator2.default.wrap(function _callee2$(_context2) {
      while (1) {
        switch (_context2.prev = _context2.next) {
          case 0:
            return _context2.abrupt('return', x + 1);

          case 1:
          case 'end':
            return _context2.stop();
        }
      }
    }, _callee2, this);
  }));
  return function b(_x2) {
    return ref.apply(this, arguments);
  };
})();

Object.defineProperty(exports, &quot;__esModule&quot;, {
  value: true
});

var _regenerator = require('babel-runtime/regenerator');

var _regenerator2 = _interopRequireDefault(_regenerator);

var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');

var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);

function _interopRequireDefault(obj) { return obj &amp;&amp; obj.__esModule ? obj : { default: obj }; }

exports.default = (function () {
  var ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(x) {
    return _regenerator2.default.wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            return _context.abrupt('return', 2 * b(x));

          case 1:
          case 'end':
            return _context.stop();
        }
      }
    }, _callee, this);
  }));
  return function a(_x) {
    return ref.apply(this, arguments);
  };
})();"><pre class="notranslate"><code class="notranslate">'use strict';

var b = (function () {
  var ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(x) {
    return _regenerator2.default.wrap(function _callee2$(_context2) {
      while (1) {
        switch (_context2.prev = _context2.next) {
          case 0:
            return _context2.abrupt('return', x + 1);

          case 1:
          case 'end':
            return _context2.stop();
        }
      }
    }, _callee2, this);
  }));
  return function b(_x2) {
    return ref.apply(this, arguments);
  };
})();

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _regenerator = require('babel-runtime/regenerator');

var _regenerator2 = _interopRequireDefault(_regenerator);

var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');

var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);

function _interopRequireDefault(obj) { return obj &amp;&amp; obj.__esModule ? obj : { default: obj }; }

exports.default = (function () {
  var ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(x) {
    return _regenerator2.default.wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            return _context.abrupt('return', 2 * b(x));

          case 1:
          case 'end':
            return _context.stop();
        }
      }
    }, _callee, this);
  }));
  return function a(_x) {
    return ref.apply(this, arguments);
  };
})();
</code></pre></div>
<p dir="auto"><code class="notranslate">_asyncToGenerator3</code> and <code class="notranslate">_regenerator2</code> are used before they are defined.  the runtime <code class="notranslate">require()</code>s should be at the top!</p>
<p dir="auto">hi.</p>
<p dir="auto">seems like <code class="notranslate">babel@4.6.x</code> -&gt; <code class="notranslate">babel@4.7.1</code> has some regression bug, because that code worked fine on previous version:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const obj = {
  symbol: Symbol()
};

class Foo {
    [obj.symbol]() {
        console.log(123);
    }
}

const foo = new Foo();

foo[obj.symbol]();"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
  <span class="pl-c1">symbol</span>: <span class="pl-v">Symbol</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">class</span> <span class="pl-v">Foo</span> <span class="pl-kos">{</span>
    <span class="pl-kos">[</span><span class="pl-s1">obj</span><span class="pl-kos">.</span><span class="pl-c1">symbol</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-c1">123</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">foo</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-s1">foo</span><span class="pl-kos">[</span><span class="pl-s1">obj</span><span class="pl-kos">.</span><span class="pl-c1">symbol</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-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="├── babel@4.7.1
├── babel-core@4.7.1
├── babel-runtime@4.7.1"><pre class="notranslate">├── babel@4.7.1
├── babel-core@4.7.1
├── babel-runtime@4.7.1</pre></div>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="babel test.js -o test.es5.js -i runtime"><pre class="notranslate">babel test.js -o test.es5.js -i runtime</pre></div>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="test/node_modules/babel/lib/babel/helpers/parse.js:54
    throw err;
          ^
RangeError: test.js: Maximum call stack size exceeded
    at new Number (native)
    at t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:473:19)
    at Array.map (native)
    at Object.t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:480:19)
    at t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:478:17)
    at Array.map (native)
    at Object.t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:480:19)
    at t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:478:17)
    at Array.map (native)
    at Object.t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:480:19)"><pre class="notranslate">test/node_modules/babel/lib/babel/helpers/parse.js:54
    throw err<span class="pl-k">;</span>
          ^
RangeError: test.js: Maximum call stack size exceeded
    at new Number (native)
    at t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:473:19)
    at Array.map (native)
    at Object.t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:480:19)
    at t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:478:17)
    at Array.map (native)
    at Object.t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:480:19)
    at t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:478:17)
    at Array.map (native)
    at Object.t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:480:19)</pre></div>
<p dir="auto">but this is still working:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const symbol = Symbol();

class Foo {
    [symbol]() {
        console.log(123);
    }
}

const foo = new Foo();

foo[symbol]();"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">symbol</span> <span class="pl-c1">=</span> <span class="pl-v">Symbol</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-k">class</span> <span class="pl-v">Foo</span> <span class="pl-kos">{</span>
    <span class="pl-kos">[</span><span class="pl-s1">symbol</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-c1">123</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">foo</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-s1">foo</span><span class="pl-kos">[</span><span class="pl-s1">symbol</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>