|
@@ -1319,6 +1319,7 @@ implementation
|
|
isclassref:boolean;
|
|
isclassref:boolean;
|
|
isrecordtype:boolean;
|
|
isrecordtype:boolean;
|
|
isobjecttype:boolean;
|
|
isobjecttype:boolean;
|
|
|
|
+ ishelpertype:boolean;
|
|
begin
|
|
begin
|
|
if sym=nil then
|
|
if sym=nil then
|
|
begin
|
|
begin
|
|
@@ -1340,12 +1341,18 @@ implementation
|
|
isclassref:=(p1.resultdef.typ=classrefdef);
|
|
isclassref:=(p1.resultdef.typ=classrefdef);
|
|
isrecordtype:=(p1.nodetype=typen) and (p1.resultdef.typ=recorddef);
|
|
isrecordtype:=(p1.nodetype=typen) and (p1.resultdef.typ=recorddef);
|
|
isobjecttype:=(p1.nodetype=typen) and is_object(p1.resultdef);
|
|
isobjecttype:=(p1.nodetype=typen) and is_object(p1.resultdef);
|
|
|
|
+ ishelpertype:=is_objectpascal_helper(tdef(sym.owner.defowner)) and
|
|
|
|
+ (p1.nodetype=typen) and
|
|
|
|
+ not is_objectpascal_helper(p1.resultdef)
|
|
|
|
+ {and
|
|
|
|
+ not (cnf_inherited in callflags)};
|
|
end
|
|
end
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
isclassref:=false;
|
|
isclassref:=false;
|
|
isrecordtype:=false;
|
|
isrecordtype:=false;
|
|
isobjecttype:=false;
|
|
isobjecttype:=false;
|
|
|
|
+ ishelpertype:=false;
|
|
end;
|
|
end;
|
|
|
|
|
|
if assigned(spezcontext) and not (sym.typ=procsym) then
|
|
if assigned(spezcontext) and not (sym.typ=procsym) then
|
|
@@ -1366,7 +1373,8 @@ implementation
|
|
isclassref or
|
|
isclassref or
|
|
(
|
|
(
|
|
(isobjecttype or
|
|
(isobjecttype or
|
|
- isrecordtype) and
|
|
|
|
|
|
+ isrecordtype or
|
|
|
|
+ ishelpertype) and
|
|
not (cnf_inherited in callflags)
|
|
not (cnf_inherited in callflags)
|
|
)
|
|
)
|
|
) and
|
|
) and
|
|
@@ -1422,8 +1430,10 @@ implementation
|
|
abstract class using the type name of that class. We
|
|
abstract class using the type name of that class. We
|
|
must not provide a warning if we use a "class of"
|
|
must not provide a warning if we use a "class of"
|
|
variable of that type though as we don't know the
|
|
variable of that type though as we don't know the
|
|
- type of the class }
|
|
|
|
- if (tcallnode(p1).procdefinition.proctypeoption=potype_constructor) and
|
|
|
|
|
|
+ type of the class
|
|
|
|
+ Note: structh might be Nil in case of a type helper }
|
|
|
|
+ if assigned(structh) and
|
|
|
|
+ (tcallnode(p1).procdefinition.proctypeoption=potype_constructor) and
|
|
(oo_is_abstract in structh.objectoptions) and
|
|
(oo_is_abstract in structh.objectoptions) and
|
|
assigned(tcallnode(p1).methodpointer) and
|
|
assigned(tcallnode(p1).methodpointer) and
|
|
(tcallnode(p1).methodpointer.nodetype=loadvmtaddrn) then
|
|
(tcallnode(p1).methodpointer.nodetype=loadvmtaddrn) then
|