|
@@ -730,11 +730,22 @@ implementation
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure check_inheritance_record_type_helper(var def:tdef);
|
|
procedure check_inheritance_record_type_helper(var def:tdef);
|
|
|
|
+ var
|
|
|
|
+ tmp : tstoreddef;
|
|
begin
|
|
begin
|
|
if (def.typ<>errordef) and assigned(current_objectdef.childof) then
|
|
if (def.typ<>errordef) and assigned(current_objectdef.childof) then
|
|
begin
|
|
begin
|
|
if def<>current_objectdef.childof.extendeddef then
|
|
if def<>current_objectdef.childof.extendeddef then
|
|
begin
|
|
begin
|
|
|
|
+ { a type helper may extend a type alias of the type its
|
|
|
|
+ parent type helper extends }
|
|
|
|
+ tmp:=tstoreddef(def);
|
|
|
|
+ while (df_unique in tmp.defoptions) and assigned(tstoreddef(tmp).orgdef) do
|
|
|
|
+ begin
|
|
|
|
+ if tmp.orgdef=current_objectdef.childof.extendeddef then
|
|
|
|
+ exit;
|
|
|
|
+ tmp:=tstoreddef(tmp.orgdef);
|
|
|
|
+ end;
|
|
Message1(type_e_record_helper_must_extend_same_record,current_objectdef.childof.extendeddef.typename);
|
|
Message1(type_e_record_helper_must_extend_same_record,current_objectdef.childof.extendeddef.typename);
|
|
def:=generrordef;
|
|
def:=generrordef;
|
|
end;
|
|
end;
|