diff --git a/lib/type.gi b/lib/type.gi index 1f5ee538c2..935b0b6b18 100644 --- a/lib/type.gi +++ b/lib/type.gi @@ -194,7 +194,11 @@ function(oper) type := "Representation"; fi; fi; + elif IsOperation(FLAG1_FILTER(oper)) and IsOperation(FLAG1_FILTER(oper)) then + # this is a setter for an and-filter + type := "Setter"; elif FLAG1_FILTER(oper) > 0 then + # this is a setter for an elementary filter type := "Setter"; elif Tester(oper) <> false then # oper is an attribute diff --git a/tst/testinstall/type.tst b/tst/testinstall/type.tst index 4e05117e88..df3fb3a28d 100644 --- a/tst/testinstall/type.tst +++ b/tst/testinstall/type.tst @@ -54,22 +54,36 @@ true gap> TypeOfOperation(IsFilter); Error, must be an operation -# +# elementary filters: property gap> TypeOfOperation(IsAbelian); "Property" gap> TypeOfOperation(HasIsAbelian); "Filter" gap> TypeOfOperation(SetIsAbelian); "Setter" + +# and-filters +gap> TypeOfOperation(IsPGroup and IsAbelian); +"Property" +gap> TypeOfOperation(HasIsPGroup and HasIsAbelian); +"Filter" +gap> TypeOfOperation(Tester(IsPGroup and IsAbelian)); +"Filter" +gap> TypeOfOperation(Setter(IsPGroup and IsAbelian)); +"Setter" + +# kernel category gap> TypeOfOperation(IsMutable); "Category" +gap> TypeOfOperation(Setter(IsMutable)); +"Setter" + +# other gap> TypeOfOperation(\+); "Operation" gap> TypeOfOperation(Size); "Attribute" gap> TypeOfOperation(AbelianGroupCons); "Constructor" -gap> TypeOfOperation(Setter(IS_MUTABLE_OBJ)); -"Setter" #