Skip to content

Support shadowing super() and super.* - fixes T6895 - #3423

Closed
loganfsmyth wants to merge 3 commits into
babel:masterfrom
loganfsmyth:shadow-super
Closed

loganfsmyth wants to merge 3 commits into
babel:masterfrom
loganfsmyth:shadow-super

Conversation

@loganfsmyth

Copy link
Copy Markdown
Member

This'll conflict with #3422 but posting for review since it'll be an easy conflict to fix.

@loganfsmyth

Copy link
Copy Markdown
Member Author

Ah hmm, not sure how I missed that test. es2015-object-super is a pain :(

@loganfsmyth

Copy link
Copy Markdown
Member Author

Closing for now, will think on more approaches to this.

@kjanoudi

Copy link
Copy Markdown

@loganfsmyth why did you choose to close this? I'm running into the issue of super with generators and wondering if you had a workaround or a fix in mind

@loganfsmyth

Copy link
Copy Markdown
Member Author

This unfortunately ended up not being the easy fix I thought it was, this PR was not quite the right fix.

@samdj

samdj commented Apr 18, 2016 •

Copy link
Copy Markdown

I'm running into the same issue as @kjanoudi
Temp solution is to use the full es2015 preset with transform-runtime till something more clear comes along.

@kjanoudi

Copy link
Copy Markdown

@samdj so the full es2015 as opposed to es2015-node5 will solve issues with
super?

On Sun, Apr 17, 2016 at 8:14 PM samdj [email protected] wrote:

I'm running into the same issue as @kjanoudi https://github.com/kjanoudi
Temp solution is to use the full es2015 preset till something more clear
comes along.

—
You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub
#3423 (comment)

Kareem

@samdj

samdj commented Apr 19, 2016 •

Copy link
Copy Markdown

@kjanoudi yes, because the fully transpiled generators & classes have seemingly proper support for super in this context. I haven't looked into the minimum subset of plugins to make it work with node5 yet, so if you are tired of your builds taking 3 times longer I'd like to see that. Last I tried I hit a unknown Expression of type "ArrowFunctionExpression" error and gave up.

My babelrc;

{
    "presets": ["es2015"],
    "plugins": [
        [
            "transform-runtime", { "polyfill": false, "regenerator": true }
        ],
        "transform-object-rest-spread",
        "transform-class-properties",
        "add-module-exports",
        [
            "transform-async-to-module-method",
            { "module": "bluebird", "method": "coroutine" }
        ]
    ]
}

@alexey2baranov

Copy link
Copy Markdown

try to use "fast-async" babel plugin. It works perfect with super.*

@lock lock Bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 7, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Oct 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants