8000 Deny manual `init()` if `#[class(init|no_init)]` is present by Bromeon · Pull Request #1196 · godot-rust/gdext · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Deny manual init() if #[class(init|no_init)] is present #1196

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

Merged
merged 1 commit into from
Jun 9, 2025

Conversation

Bromeon
Copy link
Member
@Bromeon Bromeon commented Jun 9, 2025

No longer allows manually overridden init() constructors, if either #[class(init)] or #[class(no_init)] is specified.
Should catch bugs with conflicting init strategies.

While technically breaking, this only enforces invariants that were already documented to be invalid.

Update one test that failed under this rule.
@Bromeon Bromeon added quality-of-life No new functionality, but improves ergonomics/internals c: register Register classes, functions and other symbols to GDScript labels Jun 9, 2025
@Bromeon Bromeon enabled auto-merge June 9, 2025 14:02
@Bromeon Bromeon added this pull request to the merge queue Jun 9, 2025
@GodotRust
Copy link

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-1196

Merged via the queue into master with commit 443621c Jun 9, 2025
18 checks passed
@Bromeon Bromeon deleted the qol/manual-init-contradiction branch June 9, 2025 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: register Register classes, functions and other symbols to GDScript quality-of-life No new functionality, but improves ergonomics/internals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0