diff --git a/src/exprs.c b/src/exprs.c index 265568e8149..e7947f7e4b9 100644 --- a/src/exprs.c +++ b/src/exprs.c @@ -183,22 +183,10 @@ Obj EvalAnd ( } /* handle the 'and' of two filters */ - else if (IS_PSEUDO_FILTER(opL)) { - if (!IS_FILTER(opL)) { - // support this for backwards compatibility; see discussion on - // https://github.com/gap-system/gap/pull/2732 - Warning("operation '%g' used in AND-filter is not a filter", - (Int)NAME_FUNC(opL), 0); - } + else if (IS_FILTER(opL)) { tmp = READ_EXPR(expr, 1); opR = EVAL_EXPR( tmp ); - if (IS_PSEUDO_FILTER(opR)) { - if (!IS_FILTER(opR)) { - // support this for backwards compatibility; see discussion on - // https://github.com/gap-system/gap/pull/2732 - Warning("operation '%g' used in AND-filter is not a filter", - (Int)NAME_FUNC(opR), 0); - } + if (IS_FILTER(opR)) { return NewAndFilter( opL, opR ); } else { diff --git a/src/intrprtr.c b/src/intrprtr.c index 882a6ff8e3e..4b452af69c6 100644 --- a/src/intrprtr.c +++ b/src/intrprtr.c @@ -1341,20 +1341,8 @@ void IntrAnd ( void ) } /* handle the 'and' of two filters */ - else if (IS_PSEUDO_FILTER(opL)) { - if (!IS_FILTER(opL)) { - // support this for backwards compatibility; see discussion on - // https://github.com/gap-system/gap/pull/2732 - Warning("operation '%g' used in AND-filter is not a filter\n", - (Int)NAME_FUNC(opL), 0); - } - if (IS_PSEUDO_FILTER(opR)) { - if (!IS_FILTER(opR)) { - // support this for backwards compatibility; see discussion on - // https://github.com/gap-system/gap/pull/2732 - Warning("operation '%g' used in AND-filter is not a filter", - (Int)NAME_FUNC(opR), 0); - } + else if (IS_FILTER(opL)) { + if (IS_FILTER(opR)) { PushObj( NewAndFilter( opL, opR ) ); } else { diff --git a/src/opers.h b/src/opers.h index 7b67334b6b9..3f87360a795 100644 --- a/src/opers.h +++ b/src/opers.h @@ -247,15 +247,6 @@ static inline Int IS_FILTER(Obj oper) return v & OPER_IS_FILTER; } -// temporary HACK, until all affected packages are fixed -static inline Int IS_PSEUDO_FILTER(Obj oper) -{ - if (!IS_OPERATION(oper)) - return 0; - Obj flags = FLAGS_FILT(oper); - return flags && TNUM_OBJ(flags) == T_FLAGS; -} - /**************************************************************************** ** diff --git a/tst/testinstall/boolean.tst b/tst/testinstall/boolean.tst index caf921c037a..7744cd4404c 100644 --- a/tst/testinstall/boolean.tst +++ b/tst/testinstall/boolean.tst @@ -84,16 +84,13 @@ Error, must be a filter (not a function) gap> IsAssociative and true; Error, must be a filter (not a function) gap> IsAssociative and Center; -Warning, operation 'Centre' used in AND-filter is not a filter in stream:1 - +Error, must be a filter (not a function) gap> IsAssociative and FirstOp; Error, must be a filter (not a function) gap> true and IsAssociative; Error, must be 'true' or 'false' (not a function) gap> Center and IsAssociative; -Warning, operation 'Centre' used in AND-filter is not a filter - in stream:1 - +Error, must be 'true' or 'false' or a filter (not a function) gap> FirstOp and IsAssociative; Error, must be 'true' or 'false' or a filter (not a function) gap> IsAssociative and IsAssociative; @@ -119,15 +116,13 @@ Error, must be a filter (not a function) gap> function() return IsAssociative and true; end(); Error, must be a filter (not a function) gap> function() return IsAssociative and Center; end(); -Warning, operation 'Centre' used in AND-filter is not a filter in stream:1 - +Error, must be a filter (not a function) gap> function() return IsAssociative and FirstOp; end(); Error, must be a filter (not a function) gap> function() return true and IsAssociative; end(); Error, must be 'true' or 'false' (not a function) gap> function() return Center and IsAssociative; end(); -Warning, operation 'Centre' used in AND-filter is not a filter in stream:1 - +Error, must be 'true' or 'false' or a filter (not a function) gap> function() return FirstOp and IsAssociative; end(); Error, must be 'true' or 'false' or a filter (not a function) gap> function() return IsAssociative and IsAssociative; end();