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

Compiler permits override on postinit() and init(), but probably shouldn't #26515

Open
bradcray opened this issue Jan 13, 2025 · 1 comment
Open

Comments

@bradcray
Copy link
Member

bradcray commented Jan 13, 2025

In #26430 (review), @cassella convincingly pointed out that override on a proc postinit() call doesn't really make sense, as the postinit() calls aren't really called in a dynamically dispatched way. Assuming neither of us are missing anything, this suggests that the language shouldn't really permit override to be attached to postinit() calls. Checking, it seems we also permit override to be attached to init() calls, but this also doesn't seem quite right. Note that the override calls don't seem to have an effect on the program behavior (which is somewhat reassuring).

Associated Future Test(s):

@bradcray
Copy link
Member Author

@DanilaFe : This follows up on your questions from today's demo.

bradcray added a commit that referenced this issue Jan 14, 2025
…init() (#26518)

[trivial, not reviewed]

This adds some futures noting that `override` can be applied to `init()`
and `postinit()`, where we should probably flag that as an error (issue
#26515).
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