mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 19:39:31 +02:00
* don't print "parameter not used" hints for abstract methods (mantis #30431)
git-svn-id: trunk@34281 -
This commit is contained in:
parent
f4015f6ac9
commit
c752050728
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -15193,6 +15193,7 @@ tests/webtbs/tw30329.pp -text svneol=native#text/plain
|
||||
tests/webtbs/tw30357.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw3038.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3041.pp svneol=native#text/plain
|
||||
tests/webtbs/tw30431.pp svneol=native#text/plain
|
||||
tests/webtbs/tw30443.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3045.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3048.pp svneol=native#text/plain
|
||||
|
@ -864,12 +864,14 @@ implementation
|
||||
{ also don't claim for high param of open parameters (PM) }
|
||||
{ also don't complain about unused symbols in generic procedures }
|
||||
{ and methods }
|
||||
{ and neither in abstract methods }
|
||||
if (Errorcount<>0) or
|
||||
([vo_is_hidden_para,vo_is_funcret] * tabstractvarsym(sym).varoptions = [vo_is_hidden_para]) or
|
||||
(sp_internal in tsym(sym).symoptions) or
|
||||
((assigned(tsym(sym).owner.defowner) and
|
||||
(tsym(sym).owner.defowner.typ=procdef) and
|
||||
(df_generic in tprocdef(tsym(sym).owner.defowner).defoptions))) then
|
||||
((df_generic in tprocdef(tsym(sym).owner.defowner).defoptions) or
|
||||
(po_abstractmethod in tprocdef(tsym(sym).owner.defowner).procoptions)))) then
|
||||
exit;
|
||||
if (tstoredsym(sym).refs=0) then
|
||||
begin
|
||||
|
22
tests/webtbs/tw30431.pp
Normal file
22
tests/webtbs/tw30431.pp
Normal file
@ -0,0 +1,22 @@
|
||||
{ %opt=-vh -Seh }
|
||||
{ %norun }
|
||||
|
||||
program NotUsedParamInAbstractMethodBug;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
type
|
||||
{ TXMLWriter }
|
||||
|
||||
TXMLWriter = class(TObject)
|
||||
private
|
||||
protected
|
||||
procedure Write(const Buffer; Count: Longint); virtual; abstract;
|
||||
public
|
||||
end;
|
||||
|
||||
var
|
||||
x: TXMLWriter;
|
||||
begin
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user