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

Builtin classes should be able to override constructor as regular function #109

Open
KCreate opened this issue Jul 25, 2022 · 0 comments
Open

Comments

@KCreate
Copy link
Owner

KCreate commented Jul 25, 2022

Would allow neat and tidy syntax for cast operations, e.g:

Int("25")
Number(some_user_input)
Tuple(some_list)

This can be implemented as an additional check after the kFlagNonConstructable check at interpreter.cpp:115.

The runtime should just call the constructor directly without creating an instance value first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant