mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-21 03:19:25 +01:00
* addendum for Mantis #34333: also complain about number of arguments with the maximum number of arguments for Copy ( = 3 ) is exceeded
git-svn-id: trunk@39836 -
This commit is contained in:
parent
b886ee8d2c
commit
d5f0d8e306
@ -1841,6 +1841,7 @@ implementation
|
|||||||
{ the string variants all require 2 or 3 args, only the array one allows less }
|
{ the string variants all require 2 or 3 args, only the array one allows less }
|
||||||
minargs:=2;
|
minargs:=2;
|
||||||
maxargs:=3;
|
maxargs:=3;
|
||||||
|
func:='';
|
||||||
if is_ansistring(paradef) then
|
if is_ansistring(paradef) then
|
||||||
begin
|
begin
|
||||||
// set resultdef to argument def
|
// set resultdef to argument def
|
||||||
@ -1884,7 +1885,7 @@ implementation
|
|||||||
resultdef:=cshortstringtype;
|
resultdef:=cshortstringtype;
|
||||||
func:='fpc_shortstr_copy';
|
func:='fpc_shortstr_copy';
|
||||||
end
|
end
|
||||||
else
|
else if counter<=maxargs then
|
||||||
begin
|
begin
|
||||||
do_error(true,'',ppn.left.fileinfo);
|
do_error(true,'',ppn.left.fileinfo);
|
||||||
exit(cerrornode.create);
|
exit(cerrornode.create);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user