mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-04 18:30:36 +02:00
fcl-passrc: resolver: delphi mode: allow intfvar as classtype
git-svn-id: trunk@38722 -
This commit is contained in:
parent
e1ead17c77
commit
b780c20096
@ -3559,6 +3559,7 @@ var
|
||||
ok: Boolean;
|
||||
begin
|
||||
ok:=true;
|
||||
//writeln('TPasResolver.OnFindFirstElement ',El.FullName);
|
||||
if (El is TPasProcedure)
|
||||
and ProcNeedsParams(TPasProcedure(El).ProcType) then
|
||||
// found a proc, but it needs parameters -> remember the first and continue
|
||||
@ -8895,15 +8896,6 @@ begin
|
||||
and (not TPasClassType(LeftTypeEl).IsExternal) then
|
||||
begin
|
||||
// e.g. classinst as intftype
|
||||
if msDelphi in CurrentParser.CurrentModeswitches then
|
||||
begin
|
||||
if GetClassImplementsIntf(TPasClassType(LeftTypeEl),TPasClassType(RightTypeEl))=nil then
|
||||
RaiseIncompatibleTypeRes(20180324190655,nTypesAreNotRelatedXY,[],LeftResolved,RightResolved,Bin);
|
||||
end
|
||||
else
|
||||
begin
|
||||
// objfpc: checked at runtime
|
||||
end;
|
||||
SetResolverValueExpr(ResolvedEl,btContext,RightResolved.TypeEl,Bin,[rrfReadable]);
|
||||
exit;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user