Repository navigation
Fix: Rename the members of an object's nested classes in the stubs - #87
Merged
Merged
Conversation
Issue #86. gen_stubs.py's object folding appended an object's nested classes (Companion, Horizontal, ...) to the parent class without passing them through _convert_class, which is what applies the member rule and drops the binder's own aliases. So PathOperation.Companion.reverseDifference kept its Kotlin spelling, beside the binder's reverse_difference alias. One call fixes it at any depth: upper-case names kept, receiver and anonymous slots kept, aliases dropped, no duplicates. A scan of every committed stub found no other camelCase nested member. The binder serves a nested companion's member under its snake_case alias like any proxy member (python-multiplatform #131, read from its source; the fake host does not model nested companions). The documented baselines are brought up to date as well: they still showed the counts from before #79's step 5. defect fixed: nested-class member names in stubs. test added: TheNestedCompanion (depth 2 and 3, upper-case kept, alias collapsed). Red: the camelCase name and its alias both present. documentation corrected: baselines in SPEC 0, PROJECT.md, guide. Suite with python-multiplatform 452cc807 (worktree, zip): 256 passed, 1 skipped; without a checkout, 148 passed, 109 skipped. Generating twice gives no diff; one stub changed (ui/graphics: 1 rename, 4 duplicate lines gone). Refs #86
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.
Closes #86
The converter never passed an object's nested classes (
Companion, ...) through its member rule, soPathOperation.Companion.reverseDifferencekept its Kotlin spelling. A one-line fix applies the rule at any depth. A scan found no other camelCase nested member. Test added:TheNestedCompanion; red first. The documented baselines are also corrected to the measured counts (256 passed, 1 skipped with the binder; 148 passed, 109 skipped without).