mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-25 13:30:49 +02:00
* Allow attributes on sub types. Fixes issue #40997
This commit is contained in:
parent
2d40b7c463
commit
091189a40c
@ -1205,9 +1205,16 @@ implementation
|
|||||||
Message(parser_e_type_var_const_only_in_records_and_classes);
|
Message(parser_e_type_var_const_only_in_records_and_classes);
|
||||||
consume(_TYPE);
|
consume(_TYPE);
|
||||||
object_member_blocktype:=bt_type;
|
object_member_blocktype:=bt_type;
|
||||||
{ expect at least one type declaration }
|
|
||||||
if token<>_ID then
|
if (token=_LECKKLAMMER) and (m_prefixed_attributes in current_settings.modeswitches) then
|
||||||
consume(_ID);
|
begin
|
||||||
|
check_unbound_attributes;
|
||||||
|
types_dec(true,hadgeneric, rtti_attrs_def);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
// expect at least one type declaration
|
||||||
|
if token<>_ID then
|
||||||
|
consume(_ID);
|
||||||
end;
|
end;
|
||||||
_VAR :
|
_VAR :
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user