mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 11:20:15 +02:00
* fixed mantis #6152 (allow overloads to be defined before all
forwarddefs have been implemented) git-svn-id: trunk@5995 -
This commit is contained in:
parent
6604b8ba06
commit
bc06fd4d74
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -7800,6 +7800,7 @@ tests/webtbs/tw4215.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw4219.pp svneol=native#text/plain
|
tests/webtbs/tw4219.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4223.pp svneol=native#text/plain
|
tests/webtbs/tw4223.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4229.pp -text svneol=unset#text/plain
|
tests/webtbs/tw4229.pp -text svneol=unset#text/plain
|
||||||
|
tests/webtbs/tw4229a.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4233.pp svneol=native#text/plain
|
tests/webtbs/tw4233.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4234.pp svneol=native#text/plain
|
tests/webtbs/tw4234.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4234a.pp svneol=native#text/plain
|
tests/webtbs/tw4234a.pp svneol=native#text/plain
|
||||||
|
@ -1496,7 +1496,11 @@ implementation
|
|||||||
(tprocsym(pd.procsym).ProcdefList.Count>1) and
|
(tprocsym(pd.procsym).ProcdefList.Count>1) and
|
||||||
firstpd.forwarddef and
|
firstpd.forwarddef and
|
||||||
firstpd.interfacedef and
|
firstpd.interfacedef and
|
||||||
not(tprocsym(pd.procsym).ProcdefList.Count>2) then
|
not(tprocsym(pd.procsym).ProcdefList.Count>2) and
|
||||||
|
{ don't give an error if it may be an overload }
|
||||||
|
not(m_fpc in current_settings.modeswitches) and
|
||||||
|
(not(po_overload in pd.procoptions) or
|
||||||
|
not(po_overload in firstpd.procoptions)) then
|
||||||
begin
|
begin
|
||||||
MessagePos1(pd.fileinfo,parser_e_header_dont_match_forward,pd.fullprocname(false));
|
MessagePos1(pd.fileinfo,parser_e_header_dont_match_forward,pd.fullprocname(false));
|
||||||
tprocsym(pd.procsym).write_parameter_lists(pd);
|
tprocsym(pd.procsym).write_parameter_lists(pd);
|
||||||
|
26
tests/webtbs/tw4229a.pp
Normal file
26
tests/webtbs/tw4229a.pp
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ %fail }
|
||||||
|
{ %norun}
|
||||||
|
{ Source provided for Free Pascal Bug Report 4229 }
|
||||||
|
{ Submitted by "Gerhard" on 2005-07-28 }
|
||||||
|
{ e-mail: gs@g--s.de }
|
||||||
|
unit tw4229a ;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
type
|
||||||
|
strobj = object
|
||||||
|
bs : string ;
|
||||||
|
ba : ansistring ;
|
||||||
|
end ;
|
||||||
|
|
||||||
|
operator := ( const a : ansistring ) z : strobj ;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
operator := ( const s : string ) z : strobj ;
|
||||||
|
|
||||||
|
begin
|
||||||
|
z.bs := s ;
|
||||||
|
end ;
|
||||||
|
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user