mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 08:59:27 +02:00
* 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:
parent
58456508f1
commit
549f1ecc1b
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
@ -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
17
tests/webtbf/tw10081.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user