Skip to content

Commit

Permalink
Do not require SSortedLists are homogeneous
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson authored and fingolfin committed Apr 11, 2019
1 parent bd34ff4 commit 54f718c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/lists.c
Original file line number Diff line number Diff line change
Expand Up @@ -1840,8 +1840,6 @@ Obj SET_FILTER_LIST(Obj list, Obj filter)
if (FuncIS_SUBSET_FLAGS(0,flags,FLAGS_FILT(IsSSortListProp))==True) {
new = SetFiltListTNums[TNUM_OBJ(list)][FN_IS_DENSE];
if ( new < 0 ) goto error;
new = SetFiltListTNums[TNUM_OBJ(list)][FN_IS_HOMOG];
if ( new < 0 ) goto error;
new = SetFiltListTNums[TNUM_OBJ(list)][FN_IS_SSORT];
if ( new > 0 ) RetypeBag( list, new ); else goto error;
}
Expand Down
7 changes: 7 additions & 0 deletions tst/testbugfix/2019-04-10-SSortedList.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Check we can make non-homogeneous lists into SSortedLists.
gap> l:= [ 1, Z(2) ];;
gap> SetIsSSortedList( l, true );
gap> IsSSortedList( l );
true
gap> Filtered( l, IsObject );
[ 1, Z(2)^0 ]

0 comments on commit 54f718c

Please sign in to comment.