* support deprecated for types

git-svn-id: trunk@11341 -
This commit is contained in:
florian 2008-07-07 17:59:48 +00:00
parent 68fffefb33
commit ed9c7ceaea
3 changed files with 36 additions and 3 deletions

1
.gitattributes vendored
View File

@ -6976,6 +6976,7 @@ tests/tbs/tb0550.pp svneol=native#text/plain
tests/tbs/tb0550a.pp svneol=native#text/plain
tests/tbs/tb0550b.pp svneol=native#text/plain
tests/tbs/tb0551.pp svneol=native#text/plain
tests/tbs/tb0552.pp svneol=native#text/plain
tests/tbs/tb205.pp svneol=native#text/plain
tests/tbs/ub0060.pp svneol=native#text/plain
tests/tbs/ub0069.pp svneol=native#text/plain

View File

@ -519,6 +519,7 @@ implementation
case hdef.typ of
pointerdef :
begin
try_consume_hintdirective(newtype.symoptions);
consume(_SEMICOLON);
if try_to_consume(_FAR) then
begin
@ -530,13 +531,21 @@ implementation
begin
{ in case of type renaming, don't parse proc directives }
if istyperenaming then
consume(_SEMICOLON)
begin
try_consume_hintdirective(newtype.symoptions);
consume(_SEMICOLON);
end
else
begin
if not check_proc_directive(true) then
consume(_SEMICOLON);
begin
try_consume_hintdirective(newtype.symoptions);
consume(_SEMICOLON);
end;
parse_var_proc_directives(tsym(newtype));
handle_calling_convention(tprocvardef(hdef));
if try_consume_hintdirective(newtype.symoptions) then
consume(_SEMICOLON);
end;
end;
objectdef :
@ -559,7 +568,10 @@ implementation
consume(_SEMICOLON);
end;
else
consume(_SEMICOLON);
begin
try_consume_hintdirective(newtype.symoptions);
consume(_SEMICOLON);
end;
end;
end;

20
tests/tbs/tb0552.pp Normal file
View File

@ -0,0 +1,20 @@
{$ifdef FPC}
{$mode objfpc}
{$endif FPC}
type
pb1 = ^boolean;far;
pb2 = ^boolean deprecated;far;
pt = boolean deprecated;
o = class
end deprecated;
r = record
end deprecated;
p1 = procedure;stdcall;deprecated;
p2 = procedure deprecated;
p3 = p1 deprecated;
var
v : p3;
begin
end.