mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 20:29:17 +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/tw21087.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw2128.pp svneol=native#text/plain
|
tests/webtbf/tw2128.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw2129.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/tw2154.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw2174.pp svneol=native#text/plain
|
tests/webtbf/tw2174.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw2209.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;
|
function try_consume_hintdirective(var moduleopt:tmoduleoptions; var deprecatedmsg:pshortstring):boolean;
|
||||||
var
|
var
|
||||||
|
deprecated_seen,
|
||||||
last_is_deprecated:boolean;
|
last_is_deprecated:boolean;
|
||||||
begin
|
begin
|
||||||
try_consume_hintdirective:=false;
|
try_consume_hintdirective:=false;
|
||||||
|
deprecated_seen:=false;
|
||||||
repeat
|
repeat
|
||||||
last_is_deprecated:=false;
|
last_is_deprecated:=false;
|
||||||
case idtoken of
|
case idtoken of
|
||||||
@ -1028,9 +1030,13 @@ implementation
|
|||||||
end;
|
end;
|
||||||
_DEPRECATED :
|
_DEPRECATED :
|
||||||
begin
|
begin
|
||||||
|
{ allow deprecated only once }
|
||||||
|
if deprecated_seen then
|
||||||
|
break;
|
||||||
include(moduleopt,mo_hint_deprecated);
|
include(moduleopt,mo_hint_deprecated);
|
||||||
try_consume_hintdirective:=true;
|
try_consume_hintdirective:=true;
|
||||||
last_is_deprecated:=true;
|
last_is_deprecated:=true;
|
||||||
|
deprecated_seen:=true;
|
||||||
end;
|
end;
|
||||||
_EXPERIMENTAL :
|
_EXPERIMENTAL :
|
||||||
begin
|
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