mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 08:29:32 +01:00
* fixed wrong notes about declaring two destructors after r18427:
oo_has_destructor is inherited from the parent class (because it
influences whether a VMT is required for TP-style objects),
so use separate oo_has_new_destructor flag instead
git-svn-id: branches/jvmbackend@18797 -
This commit is contained in:
parent
5e641a8fcd
commit
8a7982fe9e
@ -253,6 +253,7 @@ implementation
|
||||
Message(parser_e_no_paras_for_destructor);
|
||||
consume(_SEMICOLON);
|
||||
include(current_structdef.objectoptions,oo_has_destructor);
|
||||
include(current_structdef.objectoptions,oo_has_new_destructor);
|
||||
{ no return value }
|
||||
pd.returndef:=voidtype;
|
||||
constr_destr_finish_head(pd,pd.struct);
|
||||
@ -928,7 +929,7 @@ implementation
|
||||
Message(parser_e_cant_have_published);
|
||||
|
||||
if not is_classdef then
|
||||
if (oo_has_destructor in astruct.objectoptions) then
|
||||
if (oo_has_new_destructor in astruct.objectoptions) then
|
||||
Message(parser_n_only_one_destructor);
|
||||
|
||||
if is_interface(astruct) then
|
||||
|
||||
@ -389,7 +389,8 @@ type
|
||||
oo_is_classhelper, { objcclasses that represent categories, and Delpi-style class helpers, are marked like this }
|
||||
oo_has_class_constructor, { the object/class has a class constructor }
|
||||
oo_has_class_destructor, { the object/class has a class destructor }
|
||||
oo_is_enum_class { the class represents an enum (JVM) }
|
||||
oo_is_enum_class, { the class represents an enum (JVM) }
|
||||
oo_has_new_destructor { the object/class declares a destructor (apart from potentially inherting one from the parent) }
|
||||
);
|
||||
tobjectoptions=set of tobjectoption;
|
||||
|
||||
|
||||
@ -1301,7 +1301,8 @@ const
|
||||
(mask:oo_is_classhelper; str:'Class Helper/Category'),
|
||||
(mask:oo_has_class_constructor; str:'HasClassConstructor'),
|
||||
(mask:oo_has_class_destructor; str:'HasClassDestructor'),
|
||||
(mask:oo_is_enum_class; str:'JvmEnumClass')
|
||||
(mask:oo_is_enum_class; str:'JvmEnumClass'),
|
||||
(mask:oo_has_new_destructor; str:'HasNewDestructor')
|
||||
);
|
||||
var
|
||||
i : longint;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user