Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix printing of GAP functions containing sublist extractions #5116

Merged
merged 1 commit into from
Oct 18, 2022

Conversation

zickgraf
Copy link
Contributor

@zickgraf zickgraf commented Oct 14, 2022

  • PrintElmsListLevel preserves the old behaviour of PrintElmsList for EXPR_ELMS_LIST_LEV.
  • PrintElmsList applies to EXPR_ELMS_LIST and now checks if its first argument is of type EXPR_ELMS_LIST or EXPR_ELMS_LIST_LEV. If yes, the list is put in brackets.

Text for release notes

see title

Further details

I'm not sure this works for all cases, but I currently cannot inspect the internals of some cases due to getting a segfault (#5117). From my testing it seems that everything works fine, even for deeply nested cases.

Fixes #5109.

* PrintElmsListLevel preserves the old behaviour of PrintElmsList for
  EXPR_ELMS_LIST_LEV.
* PrintElmsList applies to EXPR_ELMS_LIST and now checks if its first
  argument is of type EXPR_ELMS_LIST or EXPR_ELMS_LIST_LEV. If yes, the
  list is put in brackets.
@zickgraf
Copy link
Contributor Author

I have now included all combinations which do not crash due to #5117 in the tests.

Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@fingolfin fingolfin added kind: bug Issues describing general bugs, and PRs fixing them topic: kernel release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes backport-to-4.12 labels Oct 18, 2022
@fingolfin fingolfin changed the title Print nested sublist extractions correctly Fix printing of GAP functions containing sublist extractions Oct 18, 2022
@fingolfin fingolfin merged commit 114824d into gap-system:master Oct 18, 2022
@zickgraf zickgraf deleted the nested_sublist_printing branch October 18, 2022 15:08
@fingolfin
Copy link
Member

Backported to stable-4.12 in commit 333aafc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-4.12-DONE kind: bug Issues describing general bugs, and PRs fixing them release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes topic: kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing brackets when printing a function with iterated sublist access
2 participants