Validate every type set reference in EMV2 type products 馃 - #3250
Merged
Merged
Conversation
Exercise type sets in the first, middle, and last positions of EMV2 type products, including multiple references and a qualified alias. Require one error on each reference with its type set name. Validate the supporting type library and legal products and standalone type sets separately. The invalid fixture reproduces the defect with only two diagnostics instead of seven.
Check each element of an EMV2 type product and report type set errors against the indexed TypeToken.type reference. This catches non-leading type sets and limits each diagnostic to the offending reference while preserving the existing named message and valid standalone type sets. The issue #2743 regression now passes both tests, including all seven expected reference diagnostics.
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 #2743
EMV2 type products only reported a type set when it was the first element, and the error highlighted the entire product. Check every element and attach each diagnostic to the indexed type reference, retaining the message that identifies the offending type set.
Issue2743Testuses external AADL fixtures to cover first, middle, and last positions, multiple type sets, and a qualified alias. It checks all seven expected errors, their messages, and the exact highlighted reference text. Separate valid cases cover error-type products, single types, standalone type sets, aliases, and unions of type sets. Before the fix, the invalid fixture produced only two errors instead of seven; the valid cases passed.Validation:
-Dtest=Issue2743Testpassed 295 tests.git diff --checkpassed; the worktree is clean.The regression commit precedes the production fix. This PR targets
masterand has no dependencies on unmerged PRs. Risk is limited to validation: previously missed invalid references now receive errors; grammar and model representation are unchanged.