Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ void ReadFuncExpr (
while ( TLS(Symbol) == S_COMMA ) {
if (narg > 0 && !strcmp(CSTR_STRING(ELM_LIST(nams,narg)),"arg"))
{
SyntaxWarning("arg used not as the last argument");
SyntaxError("arg used not as the last argument");
}

Match( S_COMMA, ",", follow );
Expand Down Expand Up @@ -1251,9 +1251,6 @@ void ReadFuncExpr (
/* 'function( ... arg )' takes a variable number of arguments */
if (narg >= 1 && ! strcmp( "arg", CSTR_STRING( ELM_LIST(nams, narg) ) ) )
{
/* TODO: remove this before the next non-beta release */
if (narg > 1)
SyntaxWarning("New syntax used -- intentional?");
narg = -narg;
}

Expand Down
3 changes: 0 additions & 3 deletions tst/testinstall/timeout.tst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ gap> spinFor := function(ms, arg) local t;
> while Runtimes().user_time + Runtimes().system_time < t + ms do od;
> if Length(arg) >= 1
> then return arg[1]; else return; fi; end;
Syntax warning: New syntax used -- intentional? in stream line 2
t := Runtimes().user_time + Runtimes().system_time;
^
function( ms, arg ) ... end
gap> spinFor(10);
gap> spinFor(10,0);
Expand Down