mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 20:49:49 +02:00
compiler: fix message regards VAR and TYPE sections in objects
git-svn-id: trunk@14606 -
This commit is contained in:
parent
cb54b3e7a9
commit
8de3b267a9
@ -1104,9 +1104,9 @@ parser_e_packed_element_no_loop=03223_E_Bit packed array elements and record fie
|
||||
% (or as \var{packed} in any mode with \var{\{\$bitpacking on\}}), it will
|
||||
% be packed at the bit level. For performance reasons, they cannot be
|
||||
% used as loop variables.
|
||||
parser_e_type_and_var_only_in_generics=03224_E_VAR and TYPE are allowed only in generics
|
||||
parser_e_type_and_var_only_in_generics_and_classes=03224_E_VAR and TYPE are allowed only in generics and classes
|
||||
% The usage of VAR and TYPE to declare new types inside an object is allowed only inside
|
||||
% generics.
|
||||
% generics and classes.
|
||||
parser_e_cant_create_generics_of_this_type=03225_E_This type can't be a generic
|
||||
% Only Classes, Objects, Interfaces and Records are allowed to be used as generic.
|
||||
parser_w_no_lineinfo_use_switch=03226_W_Don't load LINEINFO unit manually, Use the -gl compiler switch instead
|
||||
|
@ -312,7 +312,7 @@ const
|
||||
parser_e_packed_element_no_var_addr=03221;
|
||||
parser_e_packed_dynamic_open_array=03222;
|
||||
parser_e_packed_element_no_loop=03223;
|
||||
parser_e_type_and_var_only_in_generics=03224;
|
||||
parser_e_type_and_var_only_in_generics_and_classes=03224;
|
||||
parser_e_cant_create_generics_of_this_type=03225;
|
||||
parser_w_no_lineinfo_use_switch=03226;
|
||||
parser_e_no_funcret_specified=03227;
|
||||
@ -840,7 +840,7 @@ const
|
||||
option_info=11024;
|
||||
option_help_pages=11025;
|
||||
|
||||
MsgTxtSize = 55227;
|
||||
MsgTxtSize = 55239;
|
||||
|
||||
MsgIdxMax : array[1..20] of longint=(
|
||||
24,87,285,95,71,51,110,22,202,63,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -553,7 +553,7 @@ implementation
|
||||
begin
|
||||
if (([df_generic,df_specialization]*current_objectdef.defoptions)=[]) and
|
||||
(current_objectdef.objecttype<>odt_class) then
|
||||
Message(parser_e_type_and_var_only_in_generics);
|
||||
Message(parser_e_type_and_var_only_in_generics_and_classes);
|
||||
consume(_TYPE);
|
||||
object_member_blocktype:=bt_type;
|
||||
end;
|
||||
@ -561,7 +561,7 @@ implementation
|
||||
begin
|
||||
if (([df_generic,df_specialization]*current_objectdef.defoptions)=[]) and
|
||||
(current_objectdef.objecttype<>odt_class) then
|
||||
Message(parser_e_type_and_var_only_in_generics);
|
||||
Message(parser_e_type_and_var_only_in_generics_and_classes);
|
||||
consume(_VAR);
|
||||
fields_allowed:=true;
|
||||
object_member_blocktype:=bt_general;
|
||||
|
Loading…
Reference in New Issue
Block a user