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

arrow functions should not be allowed as constructors #3550

Open
erwinmombay opened this issue Feb 14, 2020 · 1 comment
Open

arrow functions should not be allowed as constructors #3550

erwinmombay opened this issue Feb 14, 2020 · 1 comment
Labels

Comments

@shicks
Copy link
Member

shicks commented Feb 14, 2020

This is tricky because we don't currently store whether a function is an arrow or not anywhere in the type model. And because newing classical functions is so common, it's not clear what the rules should be for it. I'm not sure what would happen if we said that a non-constructor is not a subtype of a constructor - likely the world would break.

@brad4d brad4d added the P3 label Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants