Repository navigation
det port: a numeric literal MOVEd to a group or alphanumeric item keeps its digits (#8223) - #8269
Merged
Merged
Conversation
…ps its digits (#8223) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
|
No description provided. |
Contributor
This was referenced Nov 12, 2026
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.
Fixes #8223:
MOVE 08000000 TO WS-START-NUM-TIME(a group) emittedCobol.move(D8000000,...), losing the leading zero; GnuCOBOL keeps08000000.Change
gen.py_move_fromcalls newliteral_digits_to_text: a numeric literal MOVEd to a group, alphanumeric, alphabetic, alphanumeric-edited or reference-modified receiver is its digits as written (leading zeros kept, sign dropped). A noninteger literal there is refused by name (IBM Table 47: invalid; GnuCOBOL only warns, C11). Numeric and numeric-edited receivers still take the value.Probed on the GnuCOBOL image:
MOVE 08000000 TO group->08000000;-0012/+0012/0012to X(6) ->0012;0012toXXBXX->00 12;0012toZZ,ZZ9->12;12.50to X(6) ->1250(warning).Class / Sibling gaps
Class: numeric-literal MOVE to a receiver whose category is not numeric. Members handled with a test each (
MOVELITZe2e program intest_det_programs.py, bytes/typed/groups modes vs GnuCOBOL): group, alphanumeric (unsigned, negative, positive, zero), alphanumeric-edited, numeric-edited (value kept), reference-modified receiver, group with FILLER; noninteger literal refused (test_a_noninteger_literal_moved_to_an_alphanumeric_item_is_refused).Sibling gaps: none found in the move path. Other literal-text paths (comparison
literal_text, INITIALIZE REPLACING) already keep the spelling. hcmadb02 / hcmaba01 (example-health-apis) were not re-proved here: the mainframe corpora checkout on this box is not at the pinned ref.Gates
Pytest MOVELITZ (3 modes) and refusal test pass; MOVELITZ fails without the fix.
pr_gates --fast: 8/9 then the one lint finding (SIM108) fixed and ruff re-checked. NOT run:det_port.py check(base translate aborts: the example-health-apis corpus on this box is not at its pinned ref) and--ratchets.🤖 Generated with Claude Code