Browse Source

fcl-passrc: resolver: delphi mode: allow intfvar as classtype

git-svn-id: trunk@38722 -
Mattias Gaertner 7 years ago
parent
commit
b780c20096
1 changed files with 1 additions and 9 deletions
  1. 1 9
      packages/fcl-passrc/src/pasresolver.pp

+ 1 - 9
packages/fcl-passrc/src/pasresolver.pp

@@ -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;