* when using overloaded functions in Delphi mode without the "overload"

directive, state that "overload" is missing rather than that
    overloading is disabled (mantis #10081)

git-svn-id: trunk@12723 -
This commit is contained in:
Jonas Maebe 2009-02-08 16:01:41 +00:00
parent 58456508f1
commit 549f1ecc1b
3 changed files with 22 additions and 1 deletions

1
.gitattributes vendored
View File

@ -8220,6 +8220,7 @@ tests/webtbf/tw0890a.pp svneol=native#text/plain
tests/webtbf/tw0893.pp svneol=native#text/plain
tests/webtbf/tw0896.pp svneol=native#text/plain
tests/webtbf/tw0896a.pp svneol=native#text/plain
tests/webtbf/tw10081.pp svneol=native#text/plain
tests/webtbf/tw10425a.pp svneol=native#text/plain
tests/webtbf/tw10457.pp svneol=native#text/plain
tests/webtbf/tw10833a.pp svneol=native#text/plain

View File

@ -2756,7 +2756,10 @@ const
begin
if not(fwpd.forwarddef) then
begin
MessagePos(currpd.fileinfo,parser_e_procedure_overloading_is_off);
if (m_tp7 in current_settings.modeswitches) then
MessagePos(currpd.fileinfo,parser_e_procedure_overloading_is_off)
else
MessagePos1(currpd.fileinfo,parser_e_no_overload_for_all_procs,currpd.procsym.realname);
break;
end;
end;

17
tests/webtbf/tw10081.pp Normal file
View File

@ -0,0 +1,17 @@
{ %fail }
{$mode delphi}
{ manual verification: make sure it complains about a missing overload
directive rather than saying that overloading is disabled
}
procedure test(a: longint);
begin
end;
procedure test(s: string);
begin
end;
begin
end.