Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to pass inflight closure to super #5476

Closed
eladb opened this issue Jan 20, 2024 · 2 comments
Closed

Unable to pass inflight closure to super #5476

eladb opened this issue Jan 20, 2024 · 2 comments
Labels
🐛 bug Something isn't working

Comments

@eladb
Copy link
Contributor

eladb commented Jan 20, 2024

I tried this:

class Base {
  new(h: inflight (): void) {}
}

class Derived extends Base {
  new(h: inflight (): void) {
    super(inflight () => {});
  }
}

new Derived(inflight () => {
  log("hello");
});

This happened:

runtime error: There is already a Construct with name 'Derived' in $Root [Default]

I expected this:

No response

Is there a workaround?

No response

Anything else?

No response

Wing Version

No response

Node.js Version

No response

Platform(s)

No response

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
@eladb eladb added the 🐛 bug Something isn't working label Jan 20, 2024
@monadabot monadabot added this to Wing Jan 20, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New - not properly defined in Wing Jan 20, 2024
@eladb
Copy link
Contributor Author

eladb commented Jan 21, 2024

Another simpler case of this:

class Foo {
  pub bar() {
    inflight () => {};
  }
}

let f = new Foo();
f.bar();
f.bar();

@staycoolcall911
Copy link
Contributor

Duplicates #4925

@staycoolcall911 staycoolcall911 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 21, 2024
@github-project-automation github-project-automation bot moved this from 🆕 New - not properly defined to ✅ Done in Wing Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants