Repository navigation
Type documented R6 fields, S4 slots, S7 properties and method results - #900
Open
renkun-ken wants to merge 7 commits into
Open
renkun-ken wants to merge 7 commits into
renkun-ken wants to merge 7 commits into
Conversation
This was referenced Nov 26, 2026
eitsupi
approved these changes
Dec 1, 2026
eitsupi
left a comment
Member
There was a problem hiding this comment.
Reviewed by ChatGPT.
The handling of concrete slot and property types, conflicting inherited hints, and computed properties appears appropriate. The additional regression tests for numeric union dispatch also address the interaction with the changes in #896.
One non-blocking architectural concern is the increasing coupling between documentation-derived type information and the inference engine. A clearer separation between type information providers and their consumers would improve maintainability and make it easier to support alternative sources of type information in the future.
No blocking issues found in this PR. Approved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 6 of the review split for #894. The base is #899.
This extends explicit parameter and return hints to method declarations and member tags. R6
@fieldcan describe a field or active binding, S4@slotcan refine anANYslot, and S7@propcan describe the result of a computed property. A generated S7 constructor can use@paramfor directly stored properties.An exact S7 method’s known return takes precedence over its generic’s annotation. Inline S4 registration callbacks can use documented formals. The analysis reads active/computed property hints without running getters. General S4 generic return dispatch and detached
@R6methodblocks remain outside this change.The S7 class and generic constructors consume scoped hints from the type-hint provider. The provider interprets the roxygen tags, including property precedence and generic parameter and return annotations.