<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong><br>
The code below causes a <code class="notranslate">Duplicate declaration "values"</code> error.</p>
<p dir="auto"><strong>Input Code</strong></p>
<ul dir="auto">
<li>REPL or Repo link if applicable: <a href="https://babeljs.io/repl/build/master#?babili=false&amp;browsers=&amp;build=&amp;builtIns=false&amp;spec=false&amp;loose=false&amp;code_lz=MYGwhgzhAECC0G8BQ1oGIBGAKAlM1qIApgC7QBuYIArkRANwrQC-Tawu-BxZlNdjVK2ZA&amp;debug=false&amp;forceAllTransforms=false&amp;shippedProposals=false&amp;circleciRepo=&amp;evaluate=false&amp;fileSize=false&amp;timeTravel=false&amp;sourceType=script&amp;lineWrap=true&amp;presets=stage-3&amp;prettier=false&amp;targets=&amp;version=7.2.0&amp;envVersion=" rel="nofollow">https://babeljs.io/repl/build/master#?babili=false&amp;browsers=&amp;build=&amp;builtIns=false&amp;spec=false&amp;loose=false&amp;code_lz=MYGwhgzhAECC0G8BQ1oGIBGAKAlM1qIApgC7QBuYIArkRANwrQC-Tawu-BxZlNdjVK2ZA&amp;debug=false&amp;forceAllTransforms=false&amp;shippedProposals=false&amp;circleciRepo=&amp;evaluate=false&amp;fileSize=false&amp;timeTravel=false&amp;sourceType=script&amp;lineWrap=true&amp;presets=stage-3&amp;prettier=false&amp;targets=&amp;version=7.2.0&amp;envVersion=</a></li>
</ul>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class A {
  #b(){
    let values;
  }
  #c(){
    let values;
  }
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">A</span> <span class="pl-kos">{</span>
  #<span class="pl-en">b</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
    <span class="pl-k">let</span> <span class="pl-s1">values</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span>
  #<span class="pl-en">c</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
    <span class="pl-k">let</span> <span class="pl-s1">values</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Expected behavior/code</strong><br>
The variables should not conflict as they are in different scopes.</p>
<p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  presets: ['@babel/preset-env','@babel/preset-react'],
  plugins: [
    '@babel/plugin-proposal-object-rest-spread',
    '@babel/plugin-proposal-private-methods',
    '@babel/plugin-proposal-class-properties',
  ]
}"><pre class="notranslate"><span class="pl-kos">{</span>
  <span class="pl-c1">presets</span>: <span class="pl-kos">[</span><span class="pl-s">'@babel/preset-env'</span><span class="pl-kos">,</span><span class="pl-s">'@babel/preset-react'</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
  <span class="pl-c1">plugins</span>: <span class="pl-kos">[</span>
    <span class="pl-s">'@babel/plugin-proposal-object-rest-spread'</span><span class="pl-kos">,</span>
    <span class="pl-s">'@babel/plugin-proposal-private-methods'</span><span class="pl-kos">,</span>
    <span class="pl-s">'@babel/plugin-proposal-class-properties'</span><span class="pl-kos">,</span>
  <span class="pl-kos">]</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s): v7.2.1</li>
<li>Node/npm version: Node 10, npm 6.4.1</li>
<li>OS: Windows 10</li>
<li>Monorepo: [e.g. yes/no/Lerna]</li>
<li>How you are using Babel: <a href="https://github.com/babel/gulp-babel"><code class="notranslate">gulp-babel</code></a></li>
</ul>
<p dir="auto">In Babel 5, it was possible to do this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="() =&gt; {
    console.log(&quot;test&quot;);
}();"><pre class="notranslate"><code class="notranslate">() =&gt; {
    console.log("test");
}();
</code></pre></div>
<p dir="auto">However, this is no longer possible in Babel 6 - it gives an "unexpected token" error.  Instead, I have to wrap the function as an expression:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(() =&gt; {
    console.log(&quot;test&quot;);
})();"><pre class="notranslate"><code class="notranslate">(() =&gt; {
    console.log("test");
})();
</code></pre></div>
<p dir="auto">I'm transpiling with the following Gulp task:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var gulp = require(&quot;gulp&quot;);
var browserify = require(&quot;browserify&quot;);
var buffer = require(&quot;vinyl-buffer&quot;);
var source = require(&quot;vinyl-source-stream&quot;);
var sourcemaps = require(&quot;gulp-sourcemaps&quot;);

gulp.task(&quot;js&quot;, function() {
    var bundler = browserify(&quot;src/app.js&quot;)
                .transform(&quot;babelify&quot;, {
                    presets: [&quot;es2015&quot;]
                });

    return bundler.bundle()
        .on(&quot;error&quot;, function(err) {
            console.error(err);
            this.emit(&quot;end&quot;);
        })
        .pipe(source(&quot;app.js&quot;))
        .pipe(buffer())
        .pipe(sourcemaps.init({ loadMaps: true }))
        .pipe(sourcemaps.write(&quot;./&quot;))
        .pipe(rename(&quot;dist/app.js&quot;))
        .pipe(gulp.dest(&quot;./&quot;));
});"><pre class="notranslate"><code class="notranslate">var gulp = require("gulp");
var browserify = require("browserify");
var buffer = require("vinyl-buffer");
var source = require("vinyl-source-stream");
var sourcemaps = require("gulp-sourcemaps");

gulp.task("js", function() {
    var bundler = browserify("src/app.js")
                .transform("babelify", {
                    presets: ["es2015"]
                });

    return bundler.bundle()
        .on("error", function(err) {
            console.error(err);
            this.emit("end");
        })
        .pipe(source("app.js"))
        .pipe(buffer())
        .pipe(sourcemaps.init({ loadMaps: true }))
        .pipe(sourcemaps.write("./"))
        .pipe(rename("dist/app.js"))
        .pipe(gulp.dest("./"));
});
</code></pre></div>
<p dir="auto">This script works fine with everything else, as long as I wrap my self-calling arrow functions in brackets.  Is this intentional, or is this a regression?</p>