<h3 dir="auto"><g-emoji class="g-emoji" alias="computer" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4bb.png">💻</g-emoji></h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Would you like to work on a fix?</li>
</ul>
<h3 dir="auto">How are you using Babel?</h3>
<p dir="auto">Programmatic API (<code class="notranslate">babel.transform</code>, <code class="notranslate">babel.parse</code>)</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="async({ foo33 = 1 });"><pre class="notranslate"><span class="pl-s1">async</span><span class="pl-kos">(</span><span class="pl-kos">{</span> foo33 <span class="pl-c1">=</span> <span class="pl-c1">1</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<h3 dir="auto">Configuration file name</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Configuration</h3>
<p dir="auto">Default parser config</p>
<h3 dir="auto">Current and expected behavior</h3>
<p dir="auto"><code class="notranslate">foo33 = 1</code> is parsed as an <code class="notranslate">ObjectProperty</code> whose value is an <code class="notranslate">AssignmentPattern</code>. It should throw, since objects cannot have property initializers with <code class="notranslate">=</code>.</p>
<h3 dir="auto">Environment</h3>
<p dir="auto">Babel 7.14.4</p>
<h3 dir="auto">Possible solution</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional context</h3>
<p dir="auto">Reported at <a href="https://twitter.com/buzyescayadev/status/1398526884955058181" rel="nofollow">https://twitter.com/buzyescayadev/status/1398526884955058181</a></p>
<h2 dir="auto">Bug Report</h2>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I would like to work on a fix!</li>
</ul>

<p dir="auto"><strong>Current behavior</strong></p>

<ul dir="auto">
<li><a href="https://babel.dev/repl#?browsers=defaults%2C%20not%20ie%2011%2C%20not%20ie_mob%2011&amp;build=&amp;builtIns=false&amp;spec=false&amp;loose=false&amp;code_lz=JYOwLgpgTgZghgYwgAgApQPYAcDOAVATyxQG8AoZZYfKAVwgC5kAjDDAGwjhAG4LkoEEABNoTABT9KCABbB2wwSCYAlLgjAA6NYjABRTgFshYZAB9kOjdvX6jJgNoBdc8loiIMUBGEAaKchYmLhMJAC-_pQAlMgAvAB8lrY2ugYQxuB80nIKSqrJVnbpJq6FKRppGWDOru6iXiA-fGFkZAD0bcj1oMBgwBggZBAAHlgYUKYIAzimOADuvbJqHlBxyOLklNR4dBCRAkKiUPuy8opC-5pXQdg4ZGFM6LeExFH5uuVFVaUFtpWOLgsdU83mEcXi_G2u2QAH4DitxKdchdAsEcDEmEjzrwgA&amp;debug=false&amp;forceAllTransforms=false&amp;shippedProposals=false&amp;circleciRepo=&amp;evaluate=false&amp;fileSize=false&amp;timeTravel=false&amp;sourceType=module&amp;lineWrap=true&amp;presets=env%2Cstage-2%2Ctypescript%2Cenv&amp;prettier=false&amp;targets=&amp;version=7.12.1&amp;externalPlugins=" rel="nofollow">REPL</a></li>
</ul>
<p dir="auto"><strong>Input Code</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface PropsType {
  isTrue: boolean;
  render: (
    children: React.ReactElement | React.ReactElement[] | undefined,
    props: {},
  ) =&gt; React.ReactElement;
  children: React.ReactElement | React.ReactElement[] | undefined;
}

// definition
export const switchRender = ({
  isTrue,
  render,
  children,
  ...props
}: PropsType): React.ReactElement | React.ReactElement[] | undefined =&gt;
  isTrue ? render(children, props) : children;"><pre class="notranslate"><span class="pl-s1">interface</span> <span class="pl-v">PropsType</span> <span class="pl-kos">{</span>
  isTrue: <span class="pl-s1">boolean</span><span class="pl-kos">;</span>
  render: <span class="pl-kos">(</span>
    <span class="pl-s1">children</span>: <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">ReactElement</span> <span class="pl-c1">|</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">ReactElement</span><span class="pl-kos">[</span><span class="pl-s1"></span><span class="pl-kos">]</span> <span class="pl-c1">|</span> <span class="pl-c1">undefined</span><span class="pl-kos">,</span>
    <span class="pl-s1">props</span>: <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span>
  <span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">ReactElement</span><span class="pl-kos">;</span>
  children: <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">ReactElement</span> <span class="pl-c1">|</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">ReactElement</span><span class="pl-kos">[</span><span class="pl-s1"></span><span class="pl-kos">]</span> <span class="pl-c1">|</span> <span class="pl-c1">undefined</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-c">// definition</span>
<span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">switchRender</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">{</span>
  isTrue<span class="pl-kos">,</span>
  render<span class="pl-kos">,</span>
  children<span class="pl-kos">,</span>
  ...<span class="pl-s1">props</span>
<span class="pl-kos">}</span>: <span class="pl-v">PropsType</span><span class="pl-kos">)</span>: <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">ReactElement</span> <span class="pl-c1">|</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">ReactElement</span><span class="pl-kos">[</span><span class="pl-s1"></span><span class="pl-kos">]</span> <span class="pl-c1">|</span> <span class="pl-c1">undefined</span> <span class="pl-c1">=</span><span class="pl-c1">&gt;</span>
  <span class="pl-s1">isTrue</span> ? <span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-s1">children</span><span class="pl-kos">,</span> <span class="pl-s1">props</span><span class="pl-kos">)</span> : <span class="pl-s1">children</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Error:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
  14 |   children,
  15 |   ...props
&gt; 16 | }: PropsType): React.ReactElement | React.ReactElement[] | undefined =&gt;
     |              ^
  17 |   isTrue ? render(children, props) : children;
"><pre class="notranslate">  <span class="pl-c1">14</span> <span class="pl-c1">|</span>   <span class="pl-s1">children</span><span class="pl-kos">,</span>
  <span class="pl-c1">15</span> <span class="pl-c1">|</span>   ...<span class="pl-s1">props</span>
<span class="pl-c1">&gt;</span> <span class="pl-c1">16</span> <span class="pl-c1">|</span> <span class="pl-kos">}</span>: <span class="pl-v">PropsType</span><span class="pl-kos">)</span>: <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">ReactElement</span> <span class="pl-c1">|</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">ReactElement</span><span class="pl-kos">[</span><span class="pl-s1"></span><span class="pl-kos">]</span> <span class="pl-c1">|</span> <span class="pl-c1">undefined</span> <span class="pl-c1">=</span><span class="pl-c1">&gt;</span>
     <span class="pl-c1">|</span>              <span class="pl-c1">^</span>
  <span class="pl-c1">17</span> <span class="pl-c1">|</span>   <span class="pl-s1">isTrue</span> ? <span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-s1">children</span><span class="pl-kos">,</span> <span class="pl-s1">props</span><span class="pl-kos">)</span> : <span class="pl-s1">children</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior</strong></p>

<p dir="auto">Error should not be here.</p>
<p dir="auto"><strong>Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)</strong></p>
<ul dir="auto">
<li>Filename: <code class="notranslate">babel.config.js</code></li>
</ul>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  presets: [
    [
      '@babel/env',
      {
        useBuiltIns: 'usage',
        corejs: 3,
      },
    ],
    '@babel/react',
    '@babel/preset-typescript',
  ],
  ...
}"><pre class="notranslate"><span class="pl-kos">{</span>
  <span class="pl-c1">presets</span>: <span class="pl-kos">[</span>
    <span class="pl-kos">[</span>
      <span class="pl-s">'@babel/env'</span><span class="pl-kos">,</span>
      <span class="pl-kos">{</span>
        <span class="pl-c1">useBuiltIns</span>: <span class="pl-s">'usage'</span><span class="pl-kos">,</span>
        <span class="pl-c1">corejs</span>: <span class="pl-c1">3</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-s">'@babel/react'</span><span class="pl-kos">,</span>
    <span class="pl-s">'@babel/preset-typescript'</span><span class="pl-kos">,</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>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="System:
    OS: macOS 10.15.6
  Binaries:
    Node: 12.19.0 - /usr/local/opt/node@12/bin/node
    Yarn: 1.22.10 - ~/Desktop/work/meep-lerna/node_modules/.bin/yarn
    npm: 6.14.8 - /usr/local/opt/node@12/bin/npm
  Monorepos:
    Yarn Workspaces: 1.22.10
    Lerna: 3.22.1
  npmPackages:
    @babel/cli: ^7.7.0 =&gt; 7.12.1
    @babel/core: ^7.7.2 =&gt; 7.12.1
    @babel/plugin-proposal-class-properties: ^7.7.0 =&gt; 7.12.1
    @babel/plugin-proposal-decorators: ^7.7.0 =&gt; 7.12.1
    @babel/plugin-proposal-export-default-from: ^7.5.2 =&gt; 7.12.1
    @babel/plugin-proposal-nullish-coalescing-operator: ^7.7.4 =&gt; 7.12.1
    @babel/plugin-proposal-optional-chaining: ^7.6.0 =&gt; 7.12.1
    @babel/plugin-transform-runtime: ^7.6.2 =&gt; 7.12.1
    @babel/preset-env: ^7.7.1 =&gt; 7.12.1
    @babel/preset-react: ^7.7.0 =&gt; 7.12.1
    @babel/preset-typescript: ^7.7.2 =&gt; 7.12.1
    @babel/runtime: ^7.7.2 =&gt; 7.12.1
    babel-eslint: ^10.0.3 =&gt; 10.1.0
    babel-jest: ^24.9.0 =&gt; 24.9.0
    babel-loader: ^8.0.5 =&gt; 8.1.0
    babel-plugin-css-modules-transform: ^1.6.1 =&gt; 1.6.2
    babel-plugin-module-resolver: ^3.1.1 =&gt; 3.2.0
    babel-plugin-transform-imports: ^2.0.0 =&gt; 2.0.0
    eslint: ^6.7.2 =&gt; 6.8.0
    eslint-import-resolver-babel-module: ^5.0.0-beta.1 =&gt; 5.1.2
    jest: ^24.9.0 =&gt; 24.9.0
    lerna: ^3.19.0 =&gt; 3.22.1
    webpack: ^4.41.2 =&gt; 4.44.2"><pre class="notranslate"><code class="notranslate">System:
    OS: macOS 10.15.6
  Binaries:
    Node: 12.19.0 - /usr/local/opt/node@12/bin/node
    Yarn: 1.22.10 - ~/Desktop/work/meep-lerna/node_modules/.bin/yarn
    npm: 6.14.8 - /usr/local/opt/node@12/bin/npm
  Monorepos:
    Yarn Workspaces: 1.22.10
    Lerna: 3.22.1
  npmPackages:
    @babel/cli: ^7.7.0 =&gt; 7.12.1
    @babel/core: ^7.7.2 =&gt; 7.12.1
    @babel/plugin-proposal-class-properties: ^7.7.0 =&gt; 7.12.1
    @babel/plugin-proposal-decorators: ^7.7.0 =&gt; 7.12.1
    @babel/plugin-proposal-export-default-from: ^7.5.2 =&gt; 7.12.1
    @babel/plugin-proposal-nullish-coalescing-operator: ^7.7.4 =&gt; 7.12.1
    @babel/plugin-proposal-optional-chaining: ^7.6.0 =&gt; 7.12.1
    @babel/plugin-transform-runtime: ^7.6.2 =&gt; 7.12.1
    @babel/preset-env: ^7.7.1 =&gt; 7.12.1
    @babel/preset-react: ^7.7.0 =&gt; 7.12.1
    @babel/preset-typescript: ^7.7.2 =&gt; 7.12.1
    @babel/runtime: ^7.7.2 =&gt; 7.12.1
    babel-eslint: ^10.0.3 =&gt; 10.1.0
    babel-jest: ^24.9.0 =&gt; 24.9.0
    babel-loader: ^8.0.5 =&gt; 8.1.0
    babel-plugin-css-modules-transform: ^1.6.1 =&gt; 1.6.2
    babel-plugin-module-resolver: ^3.1.1 =&gt; 3.2.0
    babel-plugin-transform-imports: ^2.0.0 =&gt; 2.0.0
    eslint: ^6.7.2 =&gt; 6.8.0
    eslint-import-resolver-babel-module: ^5.0.0-beta.1 =&gt; 5.1.2
    jest: ^24.9.0 =&gt; 24.9.0
    lerna: ^3.19.0 =&gt; 3.22.1
    webpack: ^4.41.2 =&gt; 4.44.2
</code></pre></div>
<ul dir="auto">
<li>Babel version(s): v7.12.1</li>
<li>Node/npm version: Node 12.19.0/npm 6.14.8</li>
<li>OS: OSX 10.15.6</li>
<li>Monorepo: Lerna</li>
<li>How you are using Babel: cli</li>
</ul>
<p dir="auto"><strong>Possible Solution</strong></p>

<p dir="auto">I think this bug is caused by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="722386919" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/12183" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/12183/hovercard" href="https://github.com/babel/babel/pull/12183">#12183</a></p>
<p dir="auto"><strong>Additional context</strong></p>