Skip to content

Commit 8c0b08c

Browse files
authored
Make ArithmeticElementCreator understand re-read mode (#5956)
In GAP one can use `Reread` (and its variants) instead of `Read` (and its variants) while developing code; this suppresses errors caused by re-defining global read-only variables. But this didn't work when using `ArithmeticElementCreator` because that had its own check for detecting and rejecting such redefinitions. This patch teaches it to honor the `REREADING` global for a smoother developer experience.
1 parent 8c83647 commit 8c0b08c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/proto.gi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function(spec)
2929
eFam, eType; # the element family and element type
3030

3131
# first check to see this hasn't already been done
32-
if IsBoundGlobal(Concatenation("Is",spec.ElementName)) then
32+
if not REREADING and IsBoundGlobal(Concatenation("Is",spec.ElementName)) then
3333
Error(Concatenation(spec.ElementName," already defined"));
3434
fi;
3535

0 commit comments

Comments
 (0)