-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce MakeIsPlistVectorRep helper
This centralizes the creation of IsPlistVectorRep instances, reducing code duplication, and enabling future refactoring. It also fixes bugs caused by incorrect reusing of the TypeObj of a vector to create another vector; this introduces bugs because the type can store things like the value of `IsZero` which must not be carelessly copied over to a new vector with different content.
- Loading branch information
Showing
3 changed files
with
95 additions
and
111 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# see https://github.com/gap-system/gap/issues/5330 | ||
gap> z:= Immutable( ZeroVector( Integers, 1 ) );; | ||
gap> IsZero( z ); HasIsZero( z ); | ||
true | ||
true | ||
gap> v:= Vector( [ 1 ], z );; | ||
gap> HasIsZero( v ); IsZero( v ); # this used to incorrectly return true | ||
false | ||
false |