* allow types in interfaces

git-svn-id: trunk@8840 -
This commit is contained in:
peter 2007-10-18 07:09:36 +00:00
parent 5fdbf74be8
commit a6eb5d839b
3 changed files with 33 additions and 8 deletions

1
.gitattributes vendored
View File

@ -8481,6 +8481,7 @@ tests/webtbs/tw9384.pp svneol=native#text/plain
tests/webtbs/tw9385.pp svneol=native#text/plain
tests/webtbs/tw9419.pp svneol=native#text/plain
tests/webtbs/tw9461.pp svneol=native#text/plain
tests/webtbs/tw9509.pp svneol=native#text/plain
tests/webtbs/tw9667.pp svneol=native#text/plain
tests/webtbs/tw9672.pp svneol=native#text/plain
tests/webtbs/tw9673.pp -text

View File

@ -663,15 +663,17 @@ implementation
end;
else
begin
if is_interface(aktobjectdef) then
Message(parser_e_no_vars_in_interfaces);
if (sp_published in current_object_option) and
not(oo_can_have_published in aktobjectdef.objectoptions) then
Message(parser_e_cant_have_published);
if current_blocktype=bt_general then
read_record_fields([vd_object])
begin
if is_interface(aktobjectdef) then
Message(parser_e_no_vars_in_interfaces);
if (sp_published in current_object_option) and
not(oo_can_have_published in aktobjectdef.objectoptions) then
Message(parser_e_cant_have_published);
read_record_fields([vd_object])
end
else
types_dec;
end;

22
tests/webtbs/tw9509.pp Normal file
View File

@ -0,0 +1,22 @@
{$mode objfpc}
{$interfaces corba}
type
generic IList<TElem> = interface
end;
generic ISet<TElem> = interface
end;
generic IMap<TKey, TValue> = interface
type
TKeySet = specialize ISet<TKey>; // wrong syntax?
TValueSet = specialize IList<TValue>; // wrong syntax?
function Keys : TKeySet;
function Values : TValueSet;
end;
begin
end.