* give a generic "type mismatch" error if copy() is called with less than

3 parameters and none of the valid cases apply (mantis #13625)

git-svn-id: trunk@13070 -
This commit is contained in:
Jonas Maebe 2009-05-01 11:40:02 +00:00
parent d6f3ecc9fc
commit 7885f6c892

View File

@ -766,7 +766,13 @@ implementation
begin
{ generic fallback that will give an error if a wrong
type is passed }
copynode:=ccallnode.createintern('fpc_shortstr_copy',paras)
if (counter=3) then
copynode:=ccallnode.createintern('fpc_shortstr_copy',paras)
else
begin
CGMessagePos(ppn.left.fileinfo,type_e_mismatch);
copynode:=cerrornode.create;
end
end;
result.free;