Skip to content

FAQ about type refinement from initializers into constructors#7639

Open
mernst wants to merge 2 commits intotypetools:masterfrom
mernst:faq-constructor-operations
Open

FAQ about type refinement from initializers into constructors#7639
mernst wants to merge 2 commits intotypetools:masterfrom
mernst:faq-constructor-operations

Conversation

@mernst
Copy link
Copy Markdown
Member

@mernst mernst commented Apr 11, 2026

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 16ca2919-7192-48ca-82ad-1a5164187acc

📥 Commits

Reviewing files that changed from the base of the PR and between 8b6b77c and 9626463.

📒 Files selected for processing (1)
  • docs/manual/faq.tex

📝 Walkthrough

Walkthrough

Added a new FAQ subsection faq-field-initializers to docs/manual/faq.tex and inserted it into the FAQ contents list and body. The subsection explains that instance field initializer assignments are treated as occurring at the beginning of constructors (immediately after superclass construction) and includes illustrative examples showing nullness warnings suppressed in constructors after such initialization but still emitted for similar dereferences in regular methods.

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/manual/faq.tex`:
- Around line 888-901: The example classes have mismatched constructor names:
change the no-arg constructors from MyClass() to match their classes (use
MyClass1() for class MyClass1 and MyClass2() for class MyClass2) so the snippets
compile; update the constructor declarations accordingly wherever MyClass()
appears for those classes (referencing class names MyClass1 and MyClass2).
- Around line 880-883: The sentence saying field initializer assignments are
"performed at the beginning of the constructor" is ambiguous; change it to
explicitly state that field initializers run before the constructor body but
after superclass construction (e.g., replace "at the beginning of the
constructor" with "before the constructor body executes (after superclass
construction)") so readers don't misread the initialization order for instance
fields/field initializers.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: dcdd8d77-5b5c-44e0-aa28-dda081d284f2

📥 Commits

Reviewing files that changed from the base of the PR and between 3a6c616 and 8b6b77c.

📒 Files selected for processing (1)
  • docs/manual/faq.tex

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants