Skip to content

Class inherit prototype uncorrect in IE10 using @babel/runtime@7.0.0-beta.46 #7892

@sorrycc

Description

@sorrycc

Bug Report

Current Behavior

The output is undefined in IE10.

Input Code

function A() {}
A.prototype.a = 'aaa';

class B extends A {}
console.log(B.prototype.a);

Expected behavior/code

Expect output aaa, but got undefined in IE10. I also tested this in @vue/cli@3.0.0-beta.9, it have the same problem.

Babel Configuration (.babelrc, package.json, cli command)

Environment

  • Babel version(s): v7.0.0-beta.36
  • Node/npm version: Node 8/npm 5
  • OS: OSX 10.13.4
  • Monorepo [e.g. yes/no/Lerna]
  • How you are using Babel: [e.g. cli, register, loader]

Possible Solution

Additional context/Screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    Spec: ClassesoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions