Skip to content

Commit

Permalink
Fix incorrect Error message in PrintToFormatted
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson authored and fingolfin committed Jan 10, 2019
1 parent c8e7bab commit ff8cc35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/string.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,7 @@ InstallGlobalFunction(PrintToFormatted, function(stream, s, data...)
ErrorNoReturn("first data argument must be a record when using {",toprint.id,"}");
fi;
if not IsBound(data[1].(toprint.id)) then
ErrorNoReturn("no record member '",toprint[1].id,"'");
ErrorNoReturn("no record member '",toprint.id,"'");
fi;
var := data[1].(toprint.id);
fi;
Expand Down
2 changes: 2 additions & 0 deletions tst/testinstall/format.tst
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,6 @@ Error, out of bounds -- used
3 replacement fields without id when there are only 2 arguments
gap> PrintFormatted("abc{3}\n", 2);
Error, out of bounds -- asked for {3} when there are only 1 arguments
gap> PrintFormatted("abc{x}\n", rec(y := 2));
Error, no record member 'x'
gap> STOP_TEST("format.tst",1);

0 comments on commit ff8cc35

Please sign in to comment.