mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-01 22:19:18 +02:00
* disable [...] syntax for procedure directives if modeswitch "prefixed attributes" is enabled; they conflict otherwise and it's not easily resolveable
+ added test git-svn-id: trunk@42402 -
This commit is contained in:
parent
b945e66e28
commit
a72553eea2
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -13211,6 +13211,8 @@ tests/test/tcustomattr11.pp svneol=native#text/pascal
|
||||
tests/test/tcustomattr12.pp svneol=native#text/pascal
|
||||
tests/test/tcustomattr13.pp svneol=native#text/pascal
|
||||
tests/test/tcustomattr14.pp svneol=native#text/pascal
|
||||
tests/test/tcustomattr15.pp svneol=native#text/pascal
|
||||
tests/test/tcustomattr16.pp svneol=native#text/pascal
|
||||
tests/test/tcustomattr2.pp svneol=native#text/pascal
|
||||
tests/test/tcustomattr3.pp svneol=native#text/pascal
|
||||
tests/test/tcustomattr4.pp svneol=native#text/pascal
|
||||
|
@ -3277,9 +3277,14 @@ const
|
||||
else
|
||||
stoprecording:=false;
|
||||
|
||||
while token in [_ID,_LECKKLAMMER] do
|
||||
while (token=_ID) or
|
||||
(
|
||||
not (m_prefixed_attributes in current_settings.modeswitches) and
|
||||
(token=_LECKKLAMMER)
|
||||
) do
|
||||
begin
|
||||
if try_to_consume(_LECKKLAMMER) then
|
||||
if not (m_prefixed_attributes in current_settings.modeswitches) and
|
||||
try_to_consume(_LECKKLAMMER) then
|
||||
begin
|
||||
repeat
|
||||
parse_proc_direc(pd,pdflags);
|
||||
|
14
tests/test/tcustomattr15.pp
Normal file
14
tests/test/tcustomattr15.pp
Normal file
@ -0,0 +1,14 @@
|
||||
{ %FAIL }
|
||||
|
||||
{ prefixed attributes modeswitch disables procedure directives inside [...] }
|
||||
|
||||
program tcustomattr15;
|
||||
|
||||
{$mode delphi}
|
||||
|
||||
procedure Test; [cdecl];
|
||||
begin
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
15
tests/test/tcustomattr16.pp
Normal file
15
tests/test/tcustomattr16.pp
Normal file
@ -0,0 +1,15 @@
|
||||
{ %FAIL }
|
||||
|
||||
{ prefixed attributes modeswitch disables procedure directives inside [...] }
|
||||
|
||||
program tcustomattr16;
|
||||
|
||||
{$mode objfpc}
|
||||
{$modeswitch prefixedattributes}
|
||||
|
||||
procedure Test; [cdecl];
|
||||
begin
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
Loading…
Reference in New Issue
Block a user