Skip to content

Commit

Permalink
kernel: new TNAMs for {component,positional,data} objects
Browse files Browse the repository at this point in the history
This fits into the work we spent on making error messages nicer to read and
more helpful to people who are not kernel experts. Note that we already has
"atomic component/positional object" in HPC-GAP.
  • Loading branch information
fingolfin committed Oct 7, 2019
1 parent 3d46735 commit 0b57928
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -1934,9 +1934,9 @@ static Obj FuncDEBUG_TNUM_NAMES(Obj self)
*V BagNames . . . . . . . . . . . . . . . . . . . . . . . list of bag names
*/
static StructBagNames BagNames[] = {
{ T_COMOBJ, "object (component)" },
{ T_POSOBJ, "object (positional)" },
{ T_DATOBJ, "object (data)" },
{ T_COMOBJ, "component object" },
{ T_POSOBJ, "positional object" },
{ T_DATOBJ, "data object" },
#if !defined(USE_THREADSAFE_COPYING)
{ T_COPYING, "copy in progress" },
#endif
Expand Down
2 changes: 1 addition & 1 deletion tst/testbugfix/2013-03-12-t00285.tst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
gap> v:=IdentityMat(28,GF(2))[1];
<a GF2 vector of length 28>
gap> v{[1..Length(v)]}{[1..5]};
Error, List Elements: <lists> must be a list (not an object (data))
Error, List Elements: <lists> must be a list (not a data object)
2 changes: 1 addition & 1 deletion tst/testinstall/hpc/serialize.tst
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ gap> CheckSerialization(OBJ_SET([false, 0, true, 1]));
#
gap> x := ZmodnZObj(1,6);;
gap> TNAM_OBJ(x);
"object (positional)"
"positional object"
gap> SerializeToNativeString(x);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `SerializableRepresentation' on 1 arguments
Expand Down
2 changes: 1 addition & 1 deletion tst/testinstall/kernel/lists.tst
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ gap> InstallMethod(Length,[r],l->5);
gap> t:=NewType(ListsFamily, r and IsMutable and IsPositionalObjectRep);;
gap> l:=Objectify(t,[]);;
gap> OnTuples(l, (1,3));
Error, Panic: cannot convert <list> (is a object (positional)) to a plain list
Error, Panic: cannot convert <list> (is a positional object) to a plain list

#
gap> STOP_TEST("kernel/lists.tst", 1);
4 changes: 2 additions & 2 deletions tst/testinstall/matblock.tst
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ Error, Matrix Assignment: <mat> must be a mutable matrix (not an atomic compon\
ent object)
#@else
gap> m1[1,2] := 5;
Error, Matrix Assignment: <mat> must be a mutable matrix (not an object (compo\
nent))
Error, Matrix Assignment: <mat> must be a mutable matrix (not a component obje\
ct)
#@fi

#
Expand Down

0 comments on commit 0b57928

Please sign in to comment.