Skip to content

Commit c9ef811

Browse files
committed
Fix TypeOfOperation for setters of and-filters
1 parent ac64e83 commit c9ef811

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

lib/type.gi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,11 @@ function(oper)
194194
type := "Representation";
195195
fi;
196196
fi;
197+
elif IsOperation(FLAG1_FILTER(oper)) and IsOperation(FLAG1_FILTER(oper)) then
198+
# this is a setter for an and-filter
199+
type := "Setter";
197200
elif FLAG1_FILTER(oper) > 0 then
201+
# this is a setter for an elementary filter
198202
type := "Setter";
199203
elif Tester(oper) <> false then
200204
# oper is an attribute

tst/testinstall/type.tst

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,36 @@ true
5454
gap> TypeOfOperation(IsFilter);
5555
Error, <oper> must be an operation
5656

57-
#
57+
# elementary filters: property
5858
gap> TypeOfOperation(IsAbelian);
5959
"Property"
6060
gap> TypeOfOperation(HasIsAbelian);
6161
"Filter"
6262
gap> TypeOfOperation(SetIsAbelian);
6363
"Setter"
64+
65+
# and-filters
66+
gap> TypeOfOperation(IsPGroup and IsAbelian);
67+
"Property"
68+
gap> TypeOfOperation(HasIsPGroup and HasIsAbelian);
69+
"Filter"
70+
gap> TypeOfOperation(Tester(IsPGroup and IsAbelian));
71+
"Filter"
72+
gap> TypeOfOperation(Setter(IsPGroup and IsAbelian));
73+
"Setter"
74+
75+
# kernel category
6476
gap> TypeOfOperation(IsMutable);
6577
"Category"
78+
gap> TypeOfOperation(Setter(IsMutable));
79+
"Setter"
80+
81+
# other
6682
gap> TypeOfOperation(\+);
6783
"Operation"
6884
gap> TypeOfOperation(Size);
6985
"Attribute"
7086
gap> TypeOfOperation(AbelianGroupCons);
7187
"Constructor"
72-
gap> TypeOfOperation(Setter(IS_MUTABLE_OBJ));
73-
"Setter"
7488

7589
#

0 commit comments

Comments
 (0)