Repository navigation
docs(PC0038): explain named record return initialization and what reaches the caller - #215
Open
MODUSCarstenScholling wants to merge 2 commits into
Open
MODUSCarstenScholling wants to merge 2 commits into
MODUSCarstenScholling wants to merge 2 commits into
Conversation
…ches the caller - Implements #596 - Document that field assignments, filters and keys set on a named Record return count as assigned - Document that Init() and Clear() count as well, and how they differ (InitValue defaults versus primary key, filters and key) - Add a section on what a returned record carries to the caller: filters and key survive only direct use, while exit(LocalRecord) and caller-side assignments copy field values only - Note that CopyFilters()/Copy() on a call result do not compile (AL0130) and recommend var parameters or GetView()/SetView() - Link the Microsoft Learn article on AL complex types
MODUSCarstenScholling
marked this pull request as ready for review
November 4, 2026 11:12
This branch has not been deployed
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.
Summary
Documents how PC0038 treats named
Recordreturn values, and what a returned record actually carries to the caller. Companion to ALCops/Analyzers#598 (fixes ALCops/Analyzers#596).Changes
Recordreturn count as assigned.Init()andClear()count as well. Both apply theInitValuedefaults; onlyInit()keeps the primary key, filters and key.exit(LocalRecord)and a caller-side assignment copy field values only.CopyFilters()andCopy()on a call result do not compile (AL0130).varparameter orGetView()/SetView().