|
@@ -133,16 +133,20 @@ implementation
|
|
consume(_SEMICOLON);
|
|
consume(_SEMICOLON);
|
|
include(current_structdef.objectoptions,oo_has_constructor);
|
|
include(current_structdef.objectoptions,oo_has_constructor);
|
|
{ Set return type, class and record constructors return the
|
|
{ Set return type, class and record constructors return the
|
|
- created instance, object constructors return boolean }
|
|
|
|
|
|
+ created instance, helper types return the extended type,
|
|
|
|
+ object constructors return boolean }
|
|
if is_class(pd.struct) or
|
|
if is_class(pd.struct) or
|
|
is_record(pd.struct) or
|
|
is_record(pd.struct) or
|
|
is_javaclass(pd.struct) then
|
|
is_javaclass(pd.struct) then
|
|
pd.returndef:=pd.struct
|
|
pd.returndef:=pd.struct
|
|
else
|
|
else
|
|
|
|
+ if is_objectpascal_helper(pd.struct) then
|
|
|
|
+ pd.returndef:=tobjectdef(pd.struct).extendeddef
|
|
|
|
+ else
|
|
{$ifdef CPU64bitaddr}
|
|
{$ifdef CPU64bitaddr}
|
|
- pd.returndef:=bool64type;
|
|
|
|
|
|
+ pd.returndef:=bool64type;
|
|
{$else CPU64bitaddr}
|
|
{$else CPU64bitaddr}
|
|
- pd.returndef:=bool32type;
|
|
|
|
|
|
+ pd.returndef:=bool32type;
|
|
{$endif CPU64bitaddr}
|
|
{$endif CPU64bitaddr}
|
|
constr_destr_finish_head(pd,pd.struct);
|
|
constr_destr_finish_head(pd,pd.struct);
|
|
result:=pd;
|
|
result:=pd;
|