mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 14:19:28 +02:00
* don't allow multiple deprecated messages, resolves #21466
git-svn-id: trunk@20515 -
This commit is contained in:
parent
e9c5458dd2
commit
fbc519faeb
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -11320,6 +11320,7 @@ tests/webtbf/tw21078.pp svneol=native#text/plain
|
||||
tests/webtbf/tw21087.pp svneol=native#text/plain
|
||||
tests/webtbf/tw2128.pp svneol=native#text/plain
|
||||
tests/webtbf/tw2129.pp svneol=native#text/plain
|
||||
tests/webtbf/tw21466.pas svneol=native#text/pascal
|
||||
tests/webtbf/tw2154.pp svneol=native#text/plain
|
||||
tests/webtbf/tw2174.pp svneol=native#text/plain
|
||||
tests/webtbf/tw2209.pp svneol=native#text/plain
|
||||
|
@ -1015,9 +1015,11 @@ implementation
|
||||
|
||||
function try_consume_hintdirective(var moduleopt:tmoduleoptions; var deprecatedmsg:pshortstring):boolean;
|
||||
var
|
||||
deprecated_seen,
|
||||
last_is_deprecated:boolean;
|
||||
begin
|
||||
try_consume_hintdirective:=false;
|
||||
deprecated_seen:=false;
|
||||
repeat
|
||||
last_is_deprecated:=false;
|
||||
case idtoken of
|
||||
@ -1028,9 +1030,13 @@ implementation
|
||||
end;
|
||||
_DEPRECATED :
|
||||
begin
|
||||
{ allow deprecated only once }
|
||||
if deprecated_seen then
|
||||
break;
|
||||
include(moduleopt,mo_hint_deprecated);
|
||||
try_consume_hintdirective:=true;
|
||||
last_is_deprecated:=true;
|
||||
deprecated_seen:=true;
|
||||
end;
|
||||
_EXPERIMENTAL :
|
||||
begin
|
||||
|
9
tests/webtbf/tw21466.pas
Normal file
9
tests/webtbf/tw21466.pas
Normal file
@ -0,0 +1,9 @@
|
||||
{ %fail }
|
||||
unit tw21466 deprecated 'blah blah' deprecated 'koko';
|
||||
|
||||
interface
|
||||
|
||||
implementation
|
||||
|
||||
finalization
|
||||
end.
|
Loading…
Reference in New Issue
Block a user