Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Unable to call super in subclass #326

Open
acutmore opened this issue Feb 7, 2021 · 1 comment
Open

Unable to call super in subclass #326

acutmore opened this issue Feb 7, 2021 · 1 comment
Labels
bug Something isn't working close after new version

Comments

@acutmore
Copy link

acutmore commented Feb 7, 2021

With this code:

class A {}

class B extends A {
    constructor() {
        super(); // <- Hegel errors here
    }
}

The call to super has an error of:

You use function "Anonymous Function" as side effect function, but it returns a B type

Playground: https://hegel.js.org/try#MYGwhgzhAECC0G8C+AoFpIwELQKYA8AXXAOwBMZ4EVpbpgB7EiQgJwFdhCHWAKASkQ06IiOwAOuPvwDcw2qlRA

@JSMonk
Copy link
Owner

JSMonk commented Feb 7, 2021

Thank you a lot for the contribution 🙏
The bug has been just fixed, so it will be available in the next Hegel.js version.
You are awesome 🤩

@JSMonk JSMonk added bug Something isn't working close after new version labels Feb 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working close after new version
Projects
None yet
Development

No branches or pull requests

2 participants