mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-03 01:09:40 +01:00
* allow types in interfaces
git-svn-id: trunk@8840 -
This commit is contained in:
parent
5fdbf74be8
commit
a6eb5d839b
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
||||
@ -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
22
tests/webtbs/tw9509.pp
Normal 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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user