Skip to content

CopyListEntries can create lists when the last element is unbound #4927

Closed
@ChrisJefferson

Description

In GAP, lists should always have a bound last element, but CopyListEntries can be used to create a completely unbound list, for example:

gap> l := [1,2,3,4,5,6];
[ 1, 2, 3, 4, 5, 6 ]
gap> CopyListEntries([], 1, 1, l, 1, 1, 6);
gap> l;
[ ,,,,, ]

This list is very "fragile", for example:

gap> IsBound(l[6]);
false
gap> l;
[ ,,,,, ]
gap> Length(l);
6
gap> Unbind(l[6]);
gap> l;
[  ]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    kind: bugIssues describing general bugs, and PRs fixing them

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions