mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-07 22:10:27 +02:00
* give an error if the same method declaration is added twice to an
interface/class/object (mantis 8019) git-svn-id: trunk@5721 -
This commit is contained in:
parent
f6473ac074
commit
66a07eba3e
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -6993,6 +6993,7 @@ tests/webtbf/tw7322.pp svneol=native#text/plain
|
||||
tests/webtbf/tw7438.pp svneol=native#text/plain
|
||||
tests/webtbf/tw7438a.pp svneol=native#text/plain
|
||||
tests/webtbf/tw7989.pp svneol=native#text/plain
|
||||
tests/webtbf/tw8019.pp svneol=native#text/plain
|
||||
tests/webtbf/uw0744.pp svneol=native#text/plain
|
||||
tests/webtbf/uw0840a.pp svneol=native#text/plain
|
||||
tests/webtbf/uw0840b.pp svneol=native#text/plain
|
||||
|
@ -280,7 +280,9 @@ implementation
|
||||
begin
|
||||
if is_visible then
|
||||
procdefcoll^.hidden:=true;
|
||||
if (_class=pd._class) and not(po_reintroduce in pd.procoptions) then
|
||||
if (pd._class=procdefcoll^.data._class) then
|
||||
MessagePos(pd.fileinfo,parser_e_overloaded_have_same_parameters)
|
||||
else if (_class=pd._class) and not(po_reintroduce in pd.procoptions) then
|
||||
MessagePos1(pd.fileinfo,parser_w_should_use_override,pd.fullprocname(false));
|
||||
end;
|
||||
end
|
||||
@ -299,7 +301,9 @@ implementation
|
||||
begin
|
||||
if is_visible then
|
||||
procdefcoll^.hidden:=true;
|
||||
if (_class=pd._class) and not(po_reintroduce in pd.procoptions) then
|
||||
if (pd._class=procdefcoll^.data._class) then
|
||||
MessagePos(pd.fileinfo,parser_e_overloaded_have_same_parameters)
|
||||
else if (_class=pd._class) and not(po_reintroduce in pd.procoptions) then
|
||||
MessagePos1(pd.fileinfo,parser_w_should_use_override,pd.fullprocname(false));
|
||||
end;
|
||||
end
|
||||
@ -374,7 +378,9 @@ implementation
|
||||
begin
|
||||
if is_visible then
|
||||
procdefcoll^.hidden:=true;
|
||||
if (_class=pd._class) and not(po_reintroduce in pd.procoptions) then
|
||||
if (pd._class=procdefcoll^.data._class) then
|
||||
MessagePos(pd.fileinfo,parser_e_overloaded_have_same_parameters)
|
||||
else if (_class=pd._class) and not(po_reintroduce in pd.procoptions) then
|
||||
MessagePos1(pd.fileinfo,parser_w_should_use_override,pd.fullprocname(false));
|
||||
end;
|
||||
end;
|
||||
|
21
tests/webtbf/tw8019.pp
Normal file
21
tests/webtbf/tw8019.pp
Normal file
@ -0,0 +1,21 @@
|
||||
{ %fail }
|
||||
|
||||
{$mode delphi}
|
||||
program test2;
|
||||
|
||||
type
|
||||
XResult = integer;
|
||||
XStr = integer;
|
||||
|
||||
PDNSEntry = ^XDNSEntry;
|
||||
XDNSEntry =
|
||||
record
|
||||
end;
|
||||
|
||||
itest = interface(iunknown)
|
||||
function GetHostByName(const Name: XStr; out Res: PDNSEntry): XResult;
|
||||
function GetHostByName(const Name: XStr; out Res: XDNSEntry): XResult;
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
Loading…
Reference in New Issue
Block a user