Skip to content

docs: Corrections to Inheritance and polymorphism page#487

Merged
developerjamiu merged 1 commit intomainfrom
docs/inheritance-polymorphism-fact-check
May 8, 2026
Merged

docs: Corrections to Inheritance and polymorphism page#487
developerjamiu merged 1 commit intomainfrom
docs/inheritance-polymorphism-fact-check

Conversation

@developerjamiu
Copy link
Copy Markdown
Contributor

Summary

Fact-checked the Inheritance and polymorphism page. Three corrections:

  • Generated code example: Showed ChildClass extends ParentClass redeclaring the parent's String name field. The analyzer explicitly forbids field redeclaration, and the actual generated code only declares new fields and forwards inherited ones via super. Removed the spurious line.
  • ### Extending a Class### Extending a class: sentence case per STYLE_GUIDE.md.
  • ### Sealed Classes### Sealed classes: same.

Test plan

  • Render the page locally and confirm the generated code block under "Sealed classes" shows only int age on the child.

Copy link
Copy Markdown
Contributor

@Swiftaxe Swiftaxe left a comment

Choose a reason for hiding this comment

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

LGTM!

@developerjamiu developerjamiu self-assigned this May 8, 2026
@developerjamiu developerjamiu merged commit 71831ae into main May 8, 2026
4 checks passed
@developerjamiu developerjamiu deleted the docs/inheritance-polymorphism-fact-check branch May 8, 2026 07:30
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