diff --git a/src/lists.c b/src/lists.c index 50ddebafbf..d8711d279d 100644 --- a/src/lists.c +++ b/src/lists.c @@ -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; } diff --git a/tst/testbugfix/2019-04-10-SSortedList.tst b/tst/testbugfix/2019-04-10-SSortedList.tst new file mode 100644 index 0000000000..31853d70b4 --- /dev/null +++ b/tst/testbugfix/2019-04-10-SSortedList.tst @@ -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 ]